Class JdkWebsocketConnector

java.lang.Object
io.fluxzero.sdk.common.websocket.JdkWebsocketConnector
All Implemented Interfaces:
WebsocketConnector

public class JdkWebsocketConnector extends Object implements WebsocketConnector
Low-level Fluxzero websocket connector backed by the JDK HttpClient websocket implementation.

The JDK WebSocket API does not expose successful 101 Switching Protocols response headers directly. This connector captures them through a per-connection CookieHandler wrapper while preserving any cookie handler configured on the supplied HttpClient.

  • Constructor Details

    • JdkWebsocketConnector

      public JdkWebsocketConnector()
      Creates a connector backed by a default HTTP/1.1 HttpClient.
    • JdkWebsocketConnector

      public JdkWebsocketConnector(HttpClient httpClient)
      Creates a connector backed by the supplied HTTP client.

      Per-connection clients are derived from this client so the connector can install its handshake-header capturing cookie handler without mutating the original client.

      Parameters:
      httpClient - base client whose proxy, SSL, authenticator, executor, cookie, and timeout settings are reused
  • Method Details