Interface JettyWebSocketServletFactory
- All Superinterfaces:
Configurable
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(String pathSpec, JettyWebSocketCreator creator) Add a WebSocket mapping to a providedJettyWebSocketCreator
.Get the names of all available WebSocket Extensions.getMapping
(String pathSpec) Returns the creator for the given path spec.void
Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClassboolean
removeMapping
(String pathSpec) Removes the mapping based on the given path spec.void
setCreator
(JettyWebSocketCreator creator) Add a WebSocket mapping at PathSpec "/" for a creatorMethods inherited from interface org.eclipse.jetty.websocket.api.Configurable
getIdleTimeout, getInputBufferSize, getMaxBinaryMessageSize, getMaxFrameSize, getMaxOutgoingFrames, getMaxTextMessageSize, getOutputBufferSize, isAutoFragment, setAutoFragment, setIdleTimeout, setInputBufferSize, setMaxBinaryMessageSize, setMaxFrameSize, setMaxOutgoingFrames, 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.
-