Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore websocket example files #3182

Closed
joakime opened this issue Dec 3, 2018 · 5 comments
Closed

Restore websocket example files #3182

joakime opened this issue Dec 3, 2018 · 5 comments
Milestone

Comments

@joakime
Copy link
Contributor

joakime commented Dec 3, 2018

In jetty-10.0.x branch, a few example files have been removed, rendering the documentation bad.

See warnings from asciidoctor

asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-api-annotations.adoc: line 27: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-common/src/test/java/examples/echo/AnnotatedEchoSocket.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-api-listener.adoc: line 26: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-common/src/test/java/examples/echo/ListenerEchoSocket.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-api-adapter.adoc: line 26: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-common/src/test/java/examples/echo/AdapterEchoSocket.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-server-api.adoc: line 34: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-servlet/src/test/java/examples/MyEchoServlet.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-server-api.adoc: line 60: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoCreator.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-server-api.adoc: line 68: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoServlet.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-client-api.adoc: line 41: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-client/src/test/java/examples/SimpleEchoClient.java
asciidoctor: WARNING: development/websockets/jetty/jetty-websocket-client-api.adoc: line 48: include file not found: C:/code/jetty/jetty.project-10.x/jetty-documentation/../jetty-websocket/websocket-client/src/test/java/examples/SimpleEchoSocket.java
@joakime joakime added this to the 10.0.x milestone Dec 3, 2018
@lachlan-roberts
Copy link
Contributor

in commits 2043a92 and 9003a0f these example files have been moved or deleted


jetty-websocket/websocket-common/src/test/java/examples/echo/AnnotatedEchoSocket.java
jetty-websocket/websocket-common/src/test/java/examples/echo/ListenerEchoSocket.java
jetty-websocket/websocket-common/src/test/java/examples/echo/AdapterEchoSocket.java

have been moved to jetty-websocket/jetty-websocket-common/src/test/java/org/eclipse/jetty/websocket/common/endpoints/adapters/


jetty-websocket/websocket-servlet/src/test/java/examples/MyEchoServlet.java
jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoCreator.java
jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoServlet.java

these ones seem to have been deleted


jetty-websocket/websocket-client/src/test/java/examples/SimpleEchoClient.java
jetty-websocket/websocket-client/src/test/java/examples/SimpleEchoSocket.java

moved to jetty-websocket/jetty-websocket-client/src/test/java/examples/

lachlan-roberts added a commit to lachlan-roberts/jetty.project that referenced this issue Jan 15, 2019
…e files

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts
Copy link
Contributor

i tried restoring the deleted examples

jetty-websocket/websocket-servlet/src/test/java/examples/MyEchoServlet.java
jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoCreator.java
jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoServlet.java

using git checkout 0c8273f2ca1f9bf2064cd9c4c939d2546443f759 -- jetty-websocket/websocket-servlet/src/test/java/examples/ but there are a lot of errors as the code has been changed a lot since then

@gregw
Copy link
Contributor

gregw commented Jan 15, 2019

Some of the problem at least looks to be needless method name changes on WebSocketServletFactory plus a few missing register and create methods there.
I think it is worthwhile putting in a bit of effort to see if we can get the API closer to the original for both the examples and for #3256

lachlan-roberts added a commit to lachlan-roberts/jetty.project that referenced this issue Jan 17, 2019
…ntation

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit to lachlan-roberts/jetty.project that referenced this issue Jan 23, 2019
added new test for these example files

added register and setCreator methods in WebSocketServlet to
give more compatibility with old api

implemented isUserInRole in UpgradeHttpServletRequest to get
example working

made the JettyWebSocketTest more clear

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit to lachlan-roberts/jetty.project that referenced this issue Jan 24, 2019
…e files

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@gregw
Copy link
Contributor

gregw commented Aug 13, 2019

@lachlan-roberts @joakime is this done?

@lachlan-roberts
Copy link
Contributor

yes this has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants