Class DefaultServerEndpointConfig
java.lang.Object
javax.websocket.server.DefaultServerEndpointConfig
- All Implemented Interfaces:
EndpointConfig, ServerEndpointConfig
The DefaultServerEndpointConfig is a concrete class that embodies all the configuration
parameters for an endpoint that is to be published as a server endpoint. Developers may
subclass this class in order to override the configuration behavior.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerEndpointConfig
ServerEndpointConfig.Builder, ServerEndpointConfig.Configurator -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultServerEndpointConfig(Class<?> endpointClass, String path, List<String> subprotocols, List<Extension> extensions, List<Class<? extends Encoder>> encoders, List<Class<? extends Decoder>> decoders, ServerEndpointConfig.Configurator serverEndpointConfigurator) DefaultServerEndpointConfig(Class<? extends Endpoint> endpointClass, String path) Creates a server configuration with the given path -
Method Summary
Modifier and TypeMethodDescriptionReturn the ServerEndpointConfiguratorReturn the Decoder implementation classes configured.Return the Encoder implementation classes configured.Class<?> Returns the class of the Endpoint that this configuration configures.Return the websocket extensions configured.getPath()Return the path of this server configuration.Return the websocket subprotocols configured.Editable map of user properties.
-
Field Details
-
path
-
endpointClass
-
subprotocols
-
extensions
-
encoders
-
decoders
-
userProperties
-
serverEndpointConfigurator
-
-
Constructor Details
-
DefaultServerEndpointConfig
-
DefaultServerEndpointConfig
-
-
Method Details
-
getEndpointClass
Returns the class of the Endpoint that this configuration configures.- Specified by:
getEndpointClassin interfaceServerEndpointConfig- Returns:
- the class of the Endpoint.
-
getEncoders
Return the Encoder implementation classes configured. These will be used by the container to encode outgoing messages.- Specified by:
getEncodersin interfaceEndpointConfig- Returns:
- the encoder implementation classes, in an unmodifiable list, empty if there are none.
-
getDecoders
Return the Decoder implementation classes configured. These will be used by the container to decode incoming messages into the expected custom objects on MessageHandler callbacks.- Specified by:
getDecodersin interfaceEndpointConfig- Returns:
- the decoder implementation classes, in an unmodifiable list.
-
getPath
Return the path of this server configuration. The path is a relative URI or URI-template.- Specified by:
getPathin interfaceServerEndpointConfig- Returns:
- the path
-
getConfigurator
Return the ServerEndpointConfigurator- Specified by:
getConfiguratorin interfaceServerEndpointConfig- Returns:
- the ServerEndpointConfigurator
-
getUserProperties
Editable map of user properties.- Specified by:
getUserPropertiesin interfaceEndpointConfig- Returns:
- a modifiable Map of application data.
-
getSubprotocols
Description copied from interface:ServerEndpointConfigReturn the websocket subprotocols configured.- Specified by:
getSubprotocolsin interfaceServerEndpointConfig- Returns:
- the list of subprotocols, the empty list if none
-
getExtensions
Description copied from interface:ServerEndpointConfigReturn the websocket extensions configured.- Specified by:
getExtensionsin interfaceServerEndpointConfig- Returns:
- the list of extensions, the empty list if none.
-