succeed callback when you do not have a message sink
OnWebSocketFrame annotation should take an API frame not a core frame
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Jetty and Javax ClientUpgradeRequests no longer use the combination of
the the onOpenFuture and the futureCoreSession and instead use only
the CompletableFuture future given to the FrameHandler onOpen
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Changes after review:
+ removed Adaptor from FrameHandler, so all non test usages of
FrameHandler now use async API.
+ Fixed sequencing of multiple async operation so callback is notified
after completion (created more Callback.from utilities for this)
+ fixed import order
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Gave onOpen, onError and onClose callback signatures
Illegal to ask for demand prior to onOpen success
added tests for various onOpen scenarios
Signed-off-by: Greg Wilkins <gregw@webtide.com>
If configure context is called with a context that does not yet have
a server, we should just throw an ISE. This is better than having a
different configuration result depending on if the context has been set
been added to the handler tree or not.
Signed-off-by: Lachlan Roberts <lachlan@webtide.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>
Re implemented a queue and flusher above extension stack to serialize
frame handling without holding a lock when calling callbacks
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Re implemented a queue and flusher above extension stack to serialize
frame handling without holding a lock when calling callbacks
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Improve ws error handling by splitting processError into handling for
errors from the network and errors from the application.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Improve ws error handling by splitting processError into handling for
errors from the network and errors from the application.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Improve ws error handling by splitting processError into handling for
errors from the network and errors from the application.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Improve ws error handling by splitting processError into handling for
errors from the network and errors from the application.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
dont allow duplicate mappings to be added to websocket mapping for javax
succeed the callback in JavaxWebSocketFrameHandler with null messageSink
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>