* 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>
Improve on #3167 with major refactor of the context initialization of
websocket:
+ The Javax and Jetty sides are more symmetric - both use shared
filter and mapping.
+ Regularised usage of beans rather than attributes for ws components
+ Customization is now part of the mapping, so ws are configured by
how they were mapped and not by who does the upgrade.
+ Filter still can be configured to customize defaults
+ Servlet can be configured to customize any ws mappings added via the
servlet
There is still some strangeness as the WebSocketServlet is mostly
generic, yet can only map Jetty API websockets.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Updated module-info.java to reference the "jetty.servlet.api" module.
* Updated POMs to reference the o.e.j.toolchain:jetty-servlet-api artifact.
* Removed references to jetty-schemas.jar.
* Updated attribute "org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern"
to match the new Jetty Servlet API jar.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>