Package javax.websocket.server
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 javax.websocket.server.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
Creates a server configuration with the given path- Parameters:
path
- the URI or URI template.
-
-
Method Details
-
getEndpointClass
Returns the class of the Endpoint that this configuration configures.- Specified by:
getEndpointClass
in 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:
getEncoders
in 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:
getDecoders
in 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:
getPath
in interfaceServerEndpointConfig
- Returns:
- the path
-
getConfigurator
Return the ServerEndpointConfigurator- Specified by:
getConfigurator
in interfaceServerEndpointConfig
- Returns:
- the ServerEndpointConfigurator
-
getUserProperties
Editable map of user properties.- Specified by:
getUserProperties
in interfaceEndpointConfig
- Returns:
- a modifiable Map of application data.
-
getSubprotocols
Description copied from interface:ServerEndpointConfig
Return the websocket subprotocols configured.- Specified by:
getSubprotocols
in interfaceServerEndpointConfig
- Returns:
- the list of subprotocols, the empty list if none
-
getExtensions
Description copied from interface:ServerEndpointConfig
Return the websocket extensions configured.- Specified by:
getExtensions
in interfaceServerEndpointConfig
- Returns:
- the list of extensions, the empty list if none.
-