public class NativeWebSocketConfiguration extends ContainerLifeCycle implements Dumpable
Only applicable if using WebSocketUpgradeFilter
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Constructor and Description |
|---|
NativeWebSocketConfiguration(ServletContext context) |
NativeWebSocketConfiguration(WebSocketServerFactory webSocketServerFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMapping(PathSpec pathSpec,
Class<?> endpointClass)
Manually add a WebSocket mapping.
|
void |
addMapping(PathSpec pathSpec,
WebSocketCreator creator)
Manually add a WebSocket mapping.
|
void |
addMapping(PathSpec spec,
WebSocketCreator creator)
Deprecated.
use
addMapping(PathSpec, Class) instead. |
void |
doStop() |
String |
dump() |
void |
dump(Appendable out,
String indent) |
WebSocketServerFactory |
getFactory()
Get WebSocketServerFactory being used.
|
MappedResource<WebSocketCreator> |
getMatch(String target)
Get the matching
MappedResource for the provided target. |
WebSocketPolicy |
getPolicy()
Used to configure the Default
WebSocketPolicy used by all endpoints that
don't redeclare the values. |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic NativeWebSocketConfiguration(ServletContext context)
public NativeWebSocketConfiguration(WebSocketServerFactory webSocketServerFactory)
public void doStop()
throws Exception
doStop in class ContainerLifeCycleExceptionpublic String dump()
dump in interface Dumpabledump in class ContainerLifeCyclepublic void dump(Appendable out, String indent) throws IOException
dump in interface Dumpabledump in class ContainerLifeCycleIOExceptionpublic WebSocketServerFactory getFactory()
public MappedResource<WebSocketCreator> getMatch(String target)
MappedResource for the provided target.target - the target pathpublic WebSocketPolicy getPolicy()
WebSocketPolicy used by all endpoints that
don't redeclare the values.public void addMapping(PathSpec pathSpec, WebSocketCreator creator)
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.
pathSpec - the pathspec to respond oncreator - the websocket creator to activate on the provided mapping.@Deprecated public void addMapping(PathSpec spec, WebSocketCreator creator)
addMapping(PathSpec, Class) instead.spec - the pathspec to respond oncreator - the websocket creator to activate on the provided mappingpublic void addMapping(PathSpec pathSpec, Class<?> endpointClass)
pathSpec - the pathspec to respond onendpointClass - the endpoint class to use for new upgrade requests on the provided
pathspec (can be an WebSocket annotated
POJO, or implementing WebSocketListener)Copyright © 1995-2016 Webtide. All Rights Reserved.