* 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>
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>
ExtensionStack.negotiate now differentiates between incorrect
extension config offered or incorrect config from negotiation
adding more BadMessageException cases
Signed-off-by: lachan-roberts <lachlan@webtide.com>
default behaviour of Negotiation no longer includes all of the
offered extensions as the negotiated extensions but it now takes
only the first extension if there are multiple of the same name,
this is now done when the negotiation is created and can be overwritten
by the negotiator
Throw exception on websocket errors so the proper status code can
be reported back to the client
fix to checking for multiple negotiated extensions of the same name
added tests for core and jetty websockets for the negotiation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
wire up the jetty-api extensions by copying the ExtensionConfig from
the jetty-api upgrade request to the core upgrade request
make UpgradeListener interface methods default for convenience
introduce test to test the functionality of API ExtensionConfig
Signed-off-by: Lachlan 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>
+ Changing usages of JVM deprecated classes / methods as well
+ Cleaning up test cases and javadoc
+ Removing test methods that rely on deprecated and now removed concepts
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>
WebSocketMappings are now stored as attributes in the ContextHandler
init params can be set on the filterHolder to specify what mapping
should be used
the default mapping is stored with attribute key
WebSocketMapping.DEFAULT_KEY and ensureFilter now doesn't ensure there
is an UpgradeFilter registered at "/*" but checks that there is an
UpgradeFilter using the default mapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
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>
throwing on adding of a duplicate websocket mapping causes problems
in EndpointViaConfigTest where we can add mappings even if they have
already been discovered by annotation
added a todo to review why we can't implement this check
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>