Interface JettyWebSocketServletFactory
- All Superinterfaces:
WebSocketPolicy
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(String pathSpec, JettyWebSocketCreator creator) Add a WebSocket mapping to a providedJettyWebSocketCreator.Get the names of all available WebSocket Extensions.default WebSocketBehaviorgetMapping(String pathSpec) Returns the creator for the given path spec.voidAdd a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClassbooleanremoveMapping(String pathSpec) Removes the mapping based on the given path spec.voidsetCreator(JettyWebSocketCreator creator) Add a WebSocket mapping at PathSpec "/" for a creatorMethods inherited from interface org.eclipse.jetty.websocket.api.WebSocketPolicy
getIdleTimeout, getInputBufferSize, getMaxBinaryMessageSize, getMaxFrameSize, getMaxTextMessageSize, getOutputBufferSize, isAutoFragment, setAutoFragment, setIdleTimeout, setInputBufferSize, setMaxBinaryMessageSize, setMaxFrameSize, setMaxTextMessageSize, setOutputBufferSize
-
Method Details
-
addMapping
Add a WebSocket mapping to a providedJettyWebSocketCreator.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.
- Parameters:
pathSpec- the pathspec to respond oncreator- the WebSocketCreator to use- Since:
- 10.0
-
register
Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClass- Parameters:
endpointClass- the WebSocket class to use
-
setCreator
Add a WebSocket mapping at PathSpec "/" for a creator- Parameters:
creator- the WebSocketCreator to use
-
getMapping
Returns the creator for the given path spec.- Parameters:
pathSpec- the pathspec to respond on- Returns:
- the websocket creator if path spec exists, or null
-
removeMapping
Removes the mapping based on the given path spec.- Parameters:
pathSpec- the pathspec to respond on- Returns:
- true if underlying mapping were altered, false otherwise
-
getAvailableExtensionNames
Get the names of all available WebSocket Extensions.- Returns:
- a set the available extension names.
-
getBehavior
- Specified by:
getBehaviorin interfaceWebSocketPolicy
-