Class NativeWebSocketConfiguration
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration
-
- All Implemented Interfaces:
Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
,MappedWebSocketCreator
@Deprecated(since="2021-05-27") public class NativeWebSocketConfiguration extends ContainerLifeCycle implements MappedWebSocketCreator
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Interface for Configuring Jetty Server Native WebSocketsOnly applicable if using
WebSocketUpgradeFilter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description NativeWebSocketConfiguration(ServletContext context)
Deprecated.NativeWebSocketConfiguration(WebSocketServerFactory webSocketServerFactory)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addMapping(java.lang.String rawspec, java.lang.Class<?> endpointClass)
Deprecated.Manually add a WebSocket mapping.void
addMapping(java.lang.String rawspec, WebSocketCreator creator)
Deprecated.Add a mapping, of a pathspec to a WebSocketCreator.void
addMapping(PathSpec pathSpec, java.lang.Class<?> endpointClass)
Deprecated.Manually add a WebSocket mapping.void
addMapping(PathSpec pathSpec, WebSocketCreator creator)
Deprecated.Manually add a WebSocket mapping.void
addMapping(PathSpec spec, WebSocketCreator creator)
Deprecated.useaddMapping(PathSpec, WebSocketCreator)
instead.void
doStop()
Deprecated.WebSocketServerFactory
getFactory()
Deprecated.Get WebSocketServerFactory being used.WebSocketCreator
getMapping(java.lang.String rawspec)
Deprecated./** Returns the creator for the given path spec.MappedResource<WebSocketCreator>
getMatch(java.lang.String target)
Deprecated.Get the matchingMappedResource
for the provided target.WebSocketPolicy
getPolicy()
Deprecated.Used to configure the DefaultWebSocketPolicy
used by all endpoints that don't redeclare the values.boolean
removeMapping(java.lang.String rawspec)
Deprecated.Removes the mapping based on the given path spec.-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
-
-
-
Constructor Detail
-
NativeWebSocketConfiguration
public NativeWebSocketConfiguration(ServletContext context)
Deprecated.
-
NativeWebSocketConfiguration
public NativeWebSocketConfiguration(WebSocketServerFactory webSocketServerFactory)
Deprecated.
-
-
Method Detail
-
doStop
public void doStop() throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
getFactory
public WebSocketServerFactory getFactory()
Deprecated.Get WebSocketServerFactory being used.- Returns:
- the WebSocketServerFactory being used.
-
getMatch
public MappedResource<WebSocketCreator> getMatch(java.lang.String target)
Deprecated.Get the matchingMappedResource
for the provided target.- Parameters:
target
- the target path- Returns:
- the matching resource, or null if no match.
-
getPolicy
public WebSocketPolicy getPolicy()
Deprecated.Used to configure the DefaultWebSocketPolicy
used by all endpoints that don't redeclare the values.- Returns:
- the default policy for all WebSockets
-
addMapping
public void addMapping(PathSpec pathSpec, WebSocketCreator creator)
Deprecated.Manually add a WebSocket mapping.If mapping is added before this configuration is started, then it is persisted through stop/start of this configuration's lifecycle. Otherwise it will be removed when this configuration is stopped.
- Specified by:
addMapping
in interfaceMappedWebSocketCreator
- Parameters:
pathSpec
- the pathspec to respond oncreator
- the websocket creator to activate on the provided mapping.
-
addMapping
@Deprecated public void addMapping(PathSpec spec, WebSocketCreator creator)
Deprecated.useaddMapping(PathSpec, WebSocketCreator)
instead.Manually add a WebSocket mapping.- Specified by:
addMapping
in interfaceMappedWebSocketCreator
- Parameters:
spec
- the pathspec to respond oncreator
- the websocket creator to activate on the provided mapping
-
addMapping
public void addMapping(PathSpec pathSpec, java.lang.Class<?> endpointClass)
Deprecated.Manually add a WebSocket mapping.- Parameters:
pathSpec
- the pathspec to respond onendpointClass
- the endpoint class to use for new upgrade requests on the provided pathspec (can be anWebSocket
annotated POJO, or implementingWebSocketListener
)
-
addMapping
public void addMapping(java.lang.String rawspec, WebSocketCreator creator)
Deprecated.Description copied from interface:MappedWebSocketCreator
Add a mapping, of a pathspec to a WebSocketCreator.Recognized Path Spec syntaxes
/path/to
or/
or*.ext
orservlet|{spec}
- Servlet Syntax
^{spec}
orregex|{spec}
- Regex Syntax
uri-template|{spec}
- URI Template (see JSR356 and RFC6570 level 1)
- Specified by:
addMapping
in interfaceMappedWebSocketCreator
- Parameters:
rawspec
- the path spec to use.creator
- the websocket creator for this specific mapping
-
getMapping
public WebSocketCreator getMapping(java.lang.String rawspec)
Deprecated.Description copied from interface:MappedWebSocketCreator
/** Returns the creator for the given path spec.- Specified by:
getMapping
in interfaceMappedWebSocketCreator
- Parameters:
rawspec
- the spec to test for (using the same spec syntax as seen inMappedWebSocketCreator.addMapping(String, WebSocketCreator)
)- Returns:
- the websocket creator if path spec exists, or null
-
removeMapping
public boolean removeMapping(java.lang.String rawspec)
Deprecated.Description copied from interface:MappedWebSocketCreator
Removes the mapping based on the given path spec.- Specified by:
removeMapping
in interfaceMappedWebSocketCreator
- Parameters:
rawspec
- the path spec to remove (using the same spec syntax as seen inMappedWebSocketCreator.addMapping(String, WebSocketCreator)
)- Returns:
- true if underlying mapping were altered, false otherwise
-
addMapping
public void addMapping(java.lang.String rawspec, java.lang.Class<?> endpointClass)
Deprecated.Manually add a WebSocket mapping.- Parameters:
rawspec
- the pathspec to map to (seeMappedWebSocketCreator.addMapping(String, WebSocketCreator)
for syntax details)endpointClass
- the endpoint class to use for new upgrade requests on the provided pathspec (can be anWebSocket
annotated POJO, or implementingWebSocketListener
)
-
-