* Avoid creating listener list for rarely used requestAttributeListener
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3964
Keep a list of EventListeners in the AbstractConnector to make it
more efficient to add and iterate over them.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
Use addEventListener rather than bespoke listener methods.
Support getEventListenerBeans at Container level for fast lookup
improve javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
fixed test
more javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
fixed tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3964
Don't use null for empty lists of listeners
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* fix merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
Resolve differences between eventListeners added as beans and beans
added as EventListeners. The behaviour should now be the same
regardless of how they listener is added and all listeners are now
beans.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
Add only SelectorManager listeners to manager from connector
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
Fixed javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
removed old TODO
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
connector cannot be null
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3964
AbstractConnector keeps a specific list of HttpChannel.Listeners
to avoid Connection.Listeners and MBean listeners being added to
the HttpChannel listener list.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
fixed merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* fixed javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #2578 EventListener
removed the ability to set/clear context listeners
Instead just remove non-durable ones.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3964 Listeners
Simplified listener handling by avoiding null connector, previously
only needed for testing.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* fixed bad merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3964 Listeners
Fixed test that assumed HttpChannel listeners were not cleared by a recycle
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3964 Listeners
Separated out durable vs cyclic HttpChannel.Listeners, so as to
simplify handling.
Deprecated cyclic HttpChannel.Listeners, as I'm not sure the channel is
the right place for them.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* removed deprecated cyclic HttpChannel listeners
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* removed deprecated cyclic HttpChannel listeners - import
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4003 Cleanup quickstart
* Fixed tests that scan for "Started" on console
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* updates from review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
- do not select duplicate extensions in javax default Configurator
- correctly copy payload for ping frames in jetty & javax frame handlers
- add ByteBuffer to javadoc for onMessage in jetty api
- cleaned up some test logging for EventSocket
- add autoFragment and maxFrameSize settings to WebSocketPolicy
- fix early validation for multiple extensions in setExtensions
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* 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>