public class NativeWebSocketConfiguration extends org.eclipse.jetty.util.component.ContainerLifeCycle implements MappedWebSocketCreator, org.eclipse.jetty.util.component.Dumpable
Only applicable if using WebSocketUpgradeFilter
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener| Constructor and Description |
|---|
NativeWebSocketConfiguration() |
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, WebSocketCreator) instead. |
void |
addMapping(String rawspec,
Class<?> endpointClass)
Manually add a WebSocket mapping.
|
void |
addMapping(String rawspec,
WebSocketCreator creator)
Add a mapping, of a pathspec to a WebSocketCreator.
|
void |
doStop() |
String |
dump() |
void |
dump(Appendable out,
String indent) |
WebSocketServerFactory |
getFactory()
Get WebSocketServerFactory being used.
|
WebSocketCreator |
getMapping(String rawspec)
Returns the creator for the given path spec.
|
PathMappings<WebSocketCreator> |
getMappings()
Get all of the PathMappings declared.
|
MappedResource<WebSocketCreator> |
getMatch(String target)
Get the matching
MappedResource for the provided target. |
org.eclipse.jetty.websocket.api.WebSocketPolicy |
getPolicy()
Used to configure the Default
WebSocketPolicy used by all endpoints that
don't redeclare the values. |
boolean |
removeMapping(String rawspec)
Removes the mapping based on the given path spec.
|
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, updateBeanspublic NativeWebSocketConfiguration()
public NativeWebSocketConfiguration(WebSocketServerFactory webSocketServerFactory)
public void doStop()
throws Exception
doStop in class org.eclipse.jetty.util.component.ContainerLifeCycleExceptionpublic String dump()
dump in interface org.eclipse.jetty.util.component.Dumpabledump in class org.eclipse.jetty.util.component.ContainerLifeCyclepublic void dump(Appendable out, String indent) throws IOException
dump in interface org.eclipse.jetty.util.component.Dumpabledump in class org.eclipse.jetty.util.component.ContainerLifeCycleIOExceptionpublic WebSocketServerFactory getFactory()
public MappedResource<WebSocketCreator> getMatch(String target)
MappedResource for the provided target.target - the target pathpublic org.eclipse.jetty.websocket.api.WebSocketPolicy getPolicy()
WebSocketPolicy used by all endpoints that
don't redeclare the values.public void addMapping(PathSpec pathSpec, WebSocketCreator creator)
addMapping in interface MappedWebSocketCreatorpathSpec - the pathspec to respond oncreator - the websocket creator to activate on the provided mapping.@Deprecated public void addMapping(PathSpec spec, WebSocketCreator creator)
addMapping(PathSpec, WebSocketCreator) instead.addMapping in interface MappedWebSocketCreatorspec - 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 org.eclipse.jetty.websocket.api.annotations.WebSocket annotated
POJO, or implementing WebSocketListener)public void addMapping(String rawspec, WebSocketCreator creator)
MappedWebSocketCreatorRecognized Path Spec syntaxes
/path/to or / or *.ext or servlet|{spec}^{spec} or regex|{spec}uri-template|{spec}addMapping in interface MappedWebSocketCreatorrawspec - the path spec to use.creator - the websocket creator for this specific mappingpublic WebSocketCreator getMapping(String rawspec)
MappedWebSocketCreatorgetMapping in interface MappedWebSocketCreatorrawspec - @param spec the spec to test for (using the same spec syntax as seen in MappedWebSocketCreator.addMapping(String, WebSocketCreator))public boolean removeMapping(String rawspec)
MappedWebSocketCreatorremoveMapping in interface MappedWebSocketCreatorrawspec - the path spec to remove (using the same spec syntax as seen in MappedWebSocketCreator.addMapping(String, WebSocketCreator))public void addMapping(String rawspec, Class<?> endpointClass)
rawspec - the pathspec to map to (see MappedWebSocketCreator.addMapping(String, WebSocketCreator) for syntax details)endpointClass - the endpoint class to use for new upgrade requests on the provided
pathspec (can be an org.eclipse.jetty.websocket.api.annotations.WebSocket annotated
POJO, or implementing WebSocketListener)public PathMappings<WebSocketCreator> getMappings()
MappedWebSocketCreatorgetMappings in interface MappedWebSocketCreatorCopyright © 1995-2018 Webtide. All Rights Reserved.