Commit Graph

2753 Commits

Author SHA1 Message Date
Lachlan Roberts 77b7e275cc Issue #3298 - fix to pom file
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-02-04 14:54:27 +11:00
Lachlan Roberts 6a98cc0bd2 Issue #3298 - bug fixes for jetty websockets
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>
2019-01-31 22:24:09 +11:00
Lachlan Roberts bd4f9b30fc Issue #3298 - cleanup of CompletableFutures for WebSocket upgrades
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>
2019-01-31 11:13:05 +11:00
Lachlan Roberts 684dcd1693 Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-3298-completableFutures 2019-01-30 15:00:01 +11:00
Lachlan Roberts 78dc801153 WebSocketMapping Refactor - add javadoc for WebSocketComponents
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-30 14:02:50 +11:00
Lachlan Roberts deaaa0bf30 Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-websocketmapping-refactor 2019-01-30 13:49:10 +11:00
Lachlan Roberts b4bd5980aa Issue #3298 - Refactor of upgrade request class names
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-30 10:00:56 +11:00
Lachlan Roberts b0aec2b26e fix bug in WebSocketMapping failing isInstance test
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-29 15:26:16 +11:00
Greg Wilkins f5751618bd Issue #3290 async onOpen, onClose and onError
Fixed OSGi tests.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 13:08:35 +11:00
Lachlan Roberts 8c5d421b5b remove unnecessary imports in jetty-websocket-tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-29 12:03:53 +11:00
Greg Wilkins cf0eaecbdc Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3290-websocket-onOpen
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:59:08 +11:00
Greg Wilkins 1d9e7b7613
Merge pull request #3199 from lachlan-roberts/jetty-10.0.x-3139-npe-websocket-sci
Issue #3139 - NPE in WebSocketContainerInitializer for jetty10
2019-01-29 10:56:59 +11:00
Greg Wilkins 3ad584eaef Issue #3290 async onOpen, onClose and onError
Changes after review:
 + failure to send abnormal close closes connection prior to failing
   callback.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:45:54 +11:00
Greg Wilkins 6f7395c8f0 Issue #3290 async onOpen, onClose and onError
Changes after review:
 + fixed import order

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:38:12 +11:00
Greg Wilkins 84d74ba1de Issue #3290 async onOpen, onClose and onError
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>
2019-01-29 10:33:37 +11:00
Lachlan Roberts 402d756ea5 rename websocket-tests module to jetty-websocket-tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-29 10:29:38 +11:00
Greg Wilkins 1171d7c8d7 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3290-websocket-onOpen 2019-01-26 18:16:30 +11:00
Greg Wilkins 8b93922d08 Issue #3290 async onOpen, onClose and onError
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>
2019-01-26 15:34:50 +11:00
Lachlan Roberts aa1d6ff9cd WebSocketMapping refactor changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-25 17:11:27 +11:00
Lachlan Roberts a8a5e50579 Issue #3139 ContextHandler must be set on server before configureContext
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>
2019-01-25 17:05:26 +11:00
Olivier Lamy 6145fd7468
Issue #3166 add autobahn testsuite running via autobahn maven plugin (#3292)
Issue #3166 Add autobahn profile to automatically run autobahn test suite in Jenkins
2019-01-25 15:10:24 +10:00
Lachlan Roberts 0c85b3138f rename of WebSocketResources to WebSocketComponents
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-25 11:57:03 +11:00
Lachlan Roberts b2f2a16aed Merge branch 'jetty-10.0.x-websocketmapping-refactor' of https://github.com/lachlan-roberts/jetty.project into jetty-10.0.x-websocketmapping-refactor 2019-01-25 11:38:40 +11:00
Lachlan Roberts ececab10ca Issue #3139 - NPE in WebSocketContainerInitializer for jetty10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-24 17:18:29 +11:00
Lachlan Roberts e98809c990 javax WebSocketMappings now stored in ContextHandler attributes
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>
2019-01-24 15:10:13 +11:00
Lachlan Roberts 1c999a1794 added missing licence headers
fixed todo with default WebSocketUpgradeFilter path mapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-24 11:50:25 +11:00
Greg Wilkins 330a3e7f58 simple onOpen test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-24 10:34:14 +11:00
Greg Wilkins f170191003 Fix problems with close unit tests before creating open unit tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-24 10:12:36 +11:00
Greg Wilkins 5f20651d06 Issue #3290 websocket onOpen states
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-24 09:48:30 +11:00
Joakim Erdfelt 5095c8a7b2 Issue #3288 - Correcting Jetty WebSocket API artifactIds
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-01-23 15:58:11 -06:00
Lachlan Roberts d37dfd4357 Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-websocketmapping-refactor
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-23 18:45:59 +11:00
Lachlan Roberts 90003dee13 Issue #3182 - restored old websocket example files
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>
2019-01-23 18:43:54 +11:00
Lachlan Roberts b06601e5f1 disable checks for duplicate websocket mappings
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>
2019-01-23 10:18:42 +11:00
Greg Wilkins d520ae5a11 Issue #2175 cleanups after review
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>
2019-01-23 09:06:27 +11:00
Greg Wilkins 3d7ee93112 Issue #2175 cleanups after review
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>
2019-01-23 08:49:55 +11:00
Greg Wilkins d598e0dc6f Issue #2175 cleanups after review
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>
2019-01-22 21:20:01 +11:00
Lachlan Roberts 74a5cfa190 remove the word default from all WebSocketServletFactory methods
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 18:32:14 +11:00
Lachlan Roberts 15c6f5250d do not set WebSocketMapping in WSUpgradeFilter if already set
the WSUpgradeFilter now has to be registered at "/" or "/*"

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 18:17:33 +11:00
Lachlan Roberts 3c2f728574 move check for duplicate mappings to WebSocketMapping class
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 18:08:31 +11:00
Greg Wilkins 7fec51ad40 Issue #2175 cleanups after review
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>
2019-01-22 15:41:46 +11:00
Greg Wilkins 1189ceed4c Issue #2175 cleanups after review
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>
2019-01-22 13:36:09 +11:00
Greg Wilkins 05dfbd18cd Issue #2175 cleanups after review
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>
2019-01-22 13:25:29 +11:00
Lachlan Roberts 4008005a0e Jetty WebSockets no longer use shared mapping
mapping is now created for each WebSocketServlet

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 11:55:18 +11:00
Lachlan Roberts e1674cf4b6 separate out resources from the WebSocketMapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 11:39:53 +11:00
Greg Wilkins f9b9cc1313 Issue #2175 cleanups after review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-22 09:11:05 +11:00
Lachlan Roberts 2ab6f3d66f added sharedresources
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-21 21:14:22 +11:00
Lachlan Roberts 0f2f1c1e92 new websocket-tests module
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-18 16:39:26 +11:00
Lachlan Roberts 51feef6dcf javax websocket bug fixes, for duplicate mappings, and null messageSinks
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>
2019-01-18 15:19:54 +11:00
Lachlan Roberts bc951030ba cleanup the isEnabledViaContext check in JavaxWebSocket SCI
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-17 12:27:42 +11:00
Greg Wilkins f16789b101 Issue #3167 cleanups after merge (in #2175)
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-16 15:19:36 +11:00