ClientEndpointConfig (WebSocket 2.2 API Documentation - Apache Tomcat 11.0.24)
Description: declaration: package: jakarta.websocket, interface: ClientEndpointConfig

# Interface ClientEndpointConfig

All Superinterfaces:
  `EndpointConfig`

public interface ClientEndpointConfig extends EndpointConfig
Provides configuration information for WebSocket client endpoints.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static final class`
  `ClientEndpointConfig.Builder`
  Builder for creating `ClientEndpointConfig` instances.
  `static class`
  `ClientEndpointConfig.Configurator`
  Provides a mechanism to customize the WebSocket handshake for client endpoints.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClientEndpointConfig.Configurator`
  `getConfigurator()`
  Returns the configurator used to customize the WebSocket handshake.
  `List<Extension>`
  `getExtensions()`
  Returns the list of extensions that this client endpoint supports.
  `List<String>`
  `getPreferredSubprotocols()`
  Returns the list of sub-protocols that this client endpoint supports, in order of preference.
  `SSLContext`
  `getSSLContext()`
  Returns the SSL context to use for secure WebSocket connections.

  ### Methods inherited from interface EndpointConfig

  `getDecoders, getEncoders, getUserProperties`

- ## Method Details

  - ### getPreferredSubprotocols

    List<String> getPreferredSubprotocols()
    Returns the list of sub-protocols that this client endpoint supports, in order of preference.
    Returns:
      The list of preferred sub-protocols

  - ### getExtensions

    List<Extension> getExtensions()
    Returns the list of extensions that this client endpoint supports.
    Returns:
      The list of supported extensions

  - ### getSSLContext

    SSLContext getSSLContext()
    Returns the SSL context to use for secure WebSocket connections.
    Returns:
      The SSL context, or `null` if no custom SSL context is configured

  - ### getConfigurator

    ClientEndpointConfig.Configurator getConfigurator()
    Returns the configurator used to customize the WebSocket handshake.
    Returns:
      The configurator for this client endpoint