java.lang.Object
jakarta.websocket.DefaultClientEndpointConfig
- All Implemented Interfaces:
ClientEndpointConfig
,EndpointConfig
The DefaultClientEndpointConfig is a concrete implementation of a client configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.ClientEndpointConfig
ClientEndpointConfig.Builder, ClientEndpointConfig.Configurator
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultClientEndpointConfig
(List<String> preferredSubprotocols, List<Extension> extensions, List<Class<? extends Encoder>> encoders, List<Class<? extends Decoder>> decoders, SSLContext sslContext, ClientEndpointConfig.Configurator clientEndpointConfigurator) -
Method Summary
Modifier and TypeMethodDescriptionReturn the custom configurator for this configuration.Return the (unmodifiable) list of decoders this client will use.Return the (unmodifiable) list of encoders this client will use.Return the extensions, in order of preference, favorite first, that this client would like to use for its sessions.Return the protocols, in order of preference, favorite first, that this client would like to use for its sessions.SSLContext to use to secure WebSocket (wss) connections ornull
for insecure Websocket (ws) connections.Editable map of user properties.
-
Field Details
-
preferredSubprotocols
-
extensions
-
encoders
-
decoders
-
sslContext
-
userProperties
-
clientEndpointConfigurator
-
-
Constructor Details
-
DefaultClientEndpointConfig
-
-
Method Details
-
getPreferredSubprotocols
Return the protocols, in order of preference, favorite first, that this client would like to use for its sessions.- Specified by:
getPreferredSubprotocols
in interfaceClientEndpointConfig
- Returns:
- the preferred subprotocols.
-
getExtensions
Return the extensions, in order of preference, favorite first, that this client would like to use for its sessions.- Specified by:
getExtensions
in interfaceClientEndpointConfig
- Returns:
- the (unmodifiable) extension list.
-
getEncoders
Return the (unmodifiable) list of encoders this client will use.- Specified by:
getEncoders
in interfaceEndpointConfig
- Returns:
- the encoder list.
-
getDecoders
Return the (unmodifiable) list of decoders this client will use.- Specified by:
getDecoders
in interfaceEndpointConfig
- Returns:
- the decoders to use.
-
getSSLContext
SSLContext to use to secure WebSocket (wss) connections ornull
for insecure Websocket (ws) connections. If there is an existing connection to the server that uses the same SSLContext and that connection supports multiplexing WebSocket connections then the container may choose to re-use that connection rather than creating a new one. Containers may provide container specific configuration to control this behaviour.- Specified by:
getSSLContext
in interfaceClientEndpointConfig
- Returns:
- the SSLContext to use to establish a secure connection to the server or
null
if an insecure connection should be established
-
getUserProperties
Editable map of user properties.- Specified by:
getUserProperties
in interfaceEndpointConfig
- Returns:
- a modifiable Map of application data.
-
getConfigurator
Description copied from interface:ClientEndpointConfig
Return the custom configurator for this configuration. If the developer did not provide one, the platform default configurator is returned.- Specified by:
getConfigurator
in interfaceClientEndpointConfig
- Returns:
- the configurator in use with this configuration.
-