Class ClientEndpointConfig.Configurator

java.lang.Object
jakarta.websocket.ClientEndpointConfig.Configurator
Enclosing interface:
ClientEndpointConfig

public static class ClientEndpointConfig.Configurator extends Object
Provides a mechanism to customize the WebSocket handshake for client endpoints. Applications may subclass this to inspect or modify the handshake.
  • Constructor Details

    • Configurator

      public Configurator()
      Creates a new instance of the default Configurator.
  • Method Details

    • beforeRequest

      public void beforeRequest(Map<String, List<String>> headers)
      Provides the client with a mechanism to inspect and/or modify the headers that are sent to the server to start the WebSocket handshake.
      Parameters:
      headers - The HTTP headers
    • afterResponse

      public void afterResponse(HandshakeResponse handshakeResponse)
      Provides the client with a mechanism to inspect the handshake response that is returned from the server.
      Parameters:
      handshakeResponse - The response