Top Methods
org.eclipse.jetty.ee10.websocket.server

public Interface JettyWebSocketServletFactory

extends Configurable
Known Direct Implementers
org.eclipse.jetty.ee10.websocket.server.JettyWebSocketServlet.CustomizedWebSocketServletFactory
Imports
java.util.Set, org.eclipse.jetty.websocket.api.Configurable

Method Summary

Modifier and TypeMethod and Description
public void
addMapping(String
the pathspec to respond on
pathSpec
,
JettyWebSocketCreator
the WebSocketCreator to use
creator
)

Add a WebSocket mapping to a provided JettyWebSocketCreator.

public Set<String>

Returns:

a set the available extension names.
getAvailableExtensionNames
()

Get the names of all available WebSocket Extensions.

public JettyWebSocketCreator

Returns:

the websocket creator if path spec exists, or null
getMapping
(String
the pathspec to respond on
pathSpec
)

Returns the creator for the given path spec.

public void
register(Class<?>
the WebSocket class to use
endpointClass
)

Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClass

public boolean

Returns:

true if underlying mapping were altered, false otherwise
removeMapping
(String
the pathspec to respond on
pathSpec
)

Removes the mapping based on the given path spec.

public void
setCreator(JettyWebSocketCreator
the WebSocketCreator to use
creator
)

Add a WebSocket mapping at PathSpec "/" for a creator

Inherited from org.eclipse.jetty.websocket.api.Configurable:
getIdleTimeoutgetInputBufferSizegetMaxBinaryMessageSizegetMaxFrameSizegetMaxOutgoingFramesgetMaxTextMessageSizegetOutputBufferSizeisAutoFragmentsetAutoFragmentsetIdleTimeoutsetInputBufferSizesetMaxBinaryMessageSizesetMaxFrameSizesetMaxOutgoingFramessetMaxTextMessageSizesetOutputBufferSize

Method Detail

addMappingback to summary
public void addMapping(String pathSpec, JettyWebSocketCreator creator)

Add a WebSocket mapping to a provided JettyWebSocketCreator.

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:String

the pathspec to respond on

creator:JettyWebSocketCreator

the WebSocketCreator to use

Since
10.0
getAvailableExtensionNamesback to summary
public Set<String> getAvailableExtensionNames()

Get the names of all available WebSocket Extensions.

Returns:Set<String>

a set the available extension names.

getMappingback to summary
public JettyWebSocketCreator getMapping(String pathSpec)

Returns the creator for the given path spec.

Parameters
pathSpec:String

the pathspec to respond on

Returns:JettyWebSocketCreator

the websocket creator if path spec exists, or null

registerback to summary
public void register(Class<?> endpointClass)

Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClass

Parameters
endpointClass:Class<?>

the WebSocket class to use

removeMappingback to summary
public boolean removeMapping(String pathSpec)

Removes the mapping based on the given path spec.

Parameters
pathSpec:String

the pathspec to respond on

Returns:boolean

true if underlying mapping were altered, false otherwise

setCreatorback to summary
public void setCreator(JettyWebSocketCreator creator)

Add a WebSocket mapping at PathSpec "/" for a creator

Parameters
creator:JettyWebSocketCreator

the WebSocketCreator to use