Class DefaultClientEndpointConfig

java.lang.Object
jakarta.websocket.DefaultClientEndpointConfig
All Implemented Interfaces:
ClientEndpointConfig, EndpointConfig

final class DefaultClientEndpointConfig extends Object implements ClientEndpointConfig
The DefaultClientEndpointConfig is a concrete implementation of a client configuration.
  • Field Details

  • Constructor Details

  • Method Details

    • getPreferredSubprotocols

      public List<String> getPreferredSubprotocols()
      Return the protocols, in order of preference, favorite first, that this client would like to use for its sessions.
      Specified by:
      getPreferredSubprotocols in interface ClientEndpointConfig
      Returns:
      the preferred subprotocols.
    • getExtensions

      public List<Extension> getExtensions()
      Return the extensions, in order of preference, favorite first, that this client would like to use for its sessions.
      Specified by:
      getExtensions in interface ClientEndpointConfig
      Returns:
      the (unmodifiable) extension list.
    • getEncoders

      public List<Class<? extends Encoder>> getEncoders()
      Return the (unmodifiable) list of encoders this client will use.
      Specified by:
      getEncoders in interface EndpointConfig
      Returns:
      the encoder list.
    • getDecoders

      public List<Class<? extends Decoder>> getDecoders()
      Return the (unmodifiable) list of decoders this client will use.
      Specified by:
      getDecoders in interface EndpointConfig
      Returns:
      the decoders to use.
    • getSSLContext

      public SSLContext getSSLContext()
      SSLContext to use to secure WebSocket (wss) connections or null 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 interface ClientEndpointConfig
      Returns:
      the SSLContext to use to establish a secure connection to the server or null if an insecure connection should be established
    • getUserProperties

      public final Map<String,Object> getUserProperties()
      Editable map of user properties.
      Specified by:
      getUserProperties in interface EndpointConfig
      Returns:
      a modifiable Map of application data.
    • getConfigurator

      public ClientEndpointConfig.Configurator 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 interface ClientEndpointConfig
      Returns:
      the configurator in use with this configuration.