* Issue #3872 Javax Websocket Packaging
Moved JaxaxWebSocketConfiguration and SCI to config package.
Limited classpath exposure in JavaxConfiguration (more needed)
Updated tests with work around for those that needs more classes exposed
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3872 Javax Websocket Packaging
Moved all remaining classes from org.eclipse.jetty.websocket.javax.server
to org.eclipse.jetty.websocket.javax.server.internal.
This works when running on the classpath, but the tests fail when running
on the modulepath (eg in commandline mvn run). The issue appears to be
that the tests don't load test classes from WEB-INF/lib or WEB-INF/classes.
Instead the test classes were themselves in org.eclipse.jetty.websocket.javax.server,
which is no longer exported from module-info.java.
The hacked "fix" for this has been to create a org.eclipse.jetty.websocket.javax.server.tests
package which is exported and to move all the tests to that. A better fix is needed.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3872 Javax Websocket Packaging
improve comments
tighten exposed classes more
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3872 - fixing tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3872 - move ContainerDefaultConfigurator to config package
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3873 - fix javax websocket test classloader issues
move websocket endpoints for test webapps to com.acme.websocket package
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3661 - review of exposed classes in jetty-websocket-server
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3762 - cleanups of jetty-websocket-server
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3705 - notify WebSocket framehandler on client upgrade failure
getFrameHandler on the ClientUpgradeRequest no longer takes
the upgrade response, the response must be set later if it is
required by the framehandler implementation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3705 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3705 - throw if FrameHandler could not be created
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* wip
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3705 - count down the onOpen latch in NetworkFuzzer
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #3705 - WebSocket Session CompletableFuture refactor
- sessionFutures for jetty and javax are now implemented using the
futureCoreSession which will occur after onOpen
- the request and response are set on the FrameHandler before the
upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
WebSocketServlet could only be used with the jetty-websocket-api
make this generic and add implementation in websocket-server
this prevents jetty-websocket-server from needing to use core classes
can cause class cast exceptions from a webapp due conflicts between the
clients version of core classes and those provided by the container
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
websocket-servlet exposes core classes as it is used by the jetty and
javax sides, so this introduces a way to add websocket mappings
with jetty-server which does not depend on websocket-servlet
to set websocket mappings through the JettyWebSocketServerContainer
you now need to use the JettyWebSocketCreator which abstracts away
the core classes from use with the jetty websocket api
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
ExtensionConfig is now interface in jetty-websocket-api and
implemented in jetty-websocket-common, for its static methods it now
uses a ExtensionConfig.Parser found by the ServiceLoader
the api tests were moved to jetty-websocket-tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
use the same FrameHandlerFactory for WebSocketServlet and
WebSocketUpgradeFilter
removed addMapping with PathSpec and only support addMapping
with String
JettyWebSocketServerContainer now implements WebSocketPolicy which
configures the FrameHandler.Customizer
Signed-off-by: lachan-roberts <lachlan@webtide.com>
rename WebSocketSessionImpl to WebSocketSession
remove SessionListener which is unused and replaced by
WebSocketSessionListener
Signed-off-by: lachan-roberts <lachlan@webtide.com>
JettyWebSocketServerContainer moved out of internal and is now used
in a similar way to the Javax server container, and can now be
used to configure upgrades using the shared mapping with
the WSUpgradeFilter
the JettyWSSCI now works in the same way as the JavaxWSSCI, the
JettyWebSocketEmbeddedStarter has been removed and the configureContext
now returns the JettyWebSocketServerContainer
WebSocket upgrade failures due to exceptions will now be logged as
a warning in WebSocketMapping rather than being ignored
Signed-off-by: lachan-roberts <lachlan@webtide.com>
rename JettyWSSCI.configure to configureContext, this is more similar
to the javax equivalent version
introduce helper method getMapping in WebSocketMapping
WebSocketServletFactory now implements FrameHandler.Configuration
changed WebSocketMapping Attribute name in WebSocketUpgradeFilter
Signed-off-by: lachan-roberts <lachlan@webtide.com>
+ Jetty WebSocket API now tracks Sessions and will close them on
lifecycle stop
+ Javax WebSocket API now tracks Sessions and will close them on
lifecycle stop
+ Adding Jetty WebSocket tests for proper close / session tracking
+ Disabling tests that need triage
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Reviewed module-info.java files.
For those that have a "requires static" added a comment about
why the dependency is optional.
Rearranged directives in alphabetical order.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>