Class GrizzlyClientSocket

java.lang.Object
org.glassfish.tyrus.container.grizzly.client.GrizzlyClientSocket

public class GrizzlyClientSocket extends Object
Implementation of the WebSocket interface.
Author:
Stepan Kopriva, Pavel Bucek
  • Field Details

    • PROXY_URI

      public static final String PROXY_URI
      Deprecated.
      Client-side user property to set proxy URI.

      Value is expected to be String and represent proxy URI. Protocol part is currently ignored but must be present (URI(String) is used for parsing).

           client.getProperties().put(GrizzlyClientSocket.PROXY_URI, "http://my.proxy.com:80");
           client.connectToServer(...);
       
      See Also:
    • PROXY_HEADERS

      public static final String PROXY_HEADERS
      Deprecated.
      Client-side user property to set additional proxy headers.

      Value is expected to be Map<String, String> and represent raw http headers to be added to initial request which is sent to proxy. Key corresponds to header name, value is header value.

      Sample below demonstrates use of this feature to set preemptive basic proxy authentication:

           final HashMap<String, String> proxyHeaders = new HashMap<String, String>();
           proxyHeaders.put("Proxy-Authorization", "Basic " +
               Base64.getEncoder().encodeToString("username:password".getBytes(Charset.forName("UTF-8"))));
      
           client.getProperties().put(GrizzlyClientSocket.PROXY_HEADERS, proxyHeaders);
           client.connectToServer(...);
       
      Please note that these headers will be used only when establishing proxy connection, for modifying WebSocket handshake headers, see ClientEndpointConfig.Configurator.beforeRequest(java.util.Map).
      See Also:
    • WORKER_THREAD_POOL_CONFIG

      public static final String WORKER_THREAD_POOL_CONFIG
      Client-side property to set custom worker ThreadPoolConfig.

      Value is expected to be instance of ThreadPoolConfig, can be null (it won't be used).

      See Also:
    • SELECTOR_THREAD_POOL_CONFIG

      public static final String SELECTOR_THREAD_POOL_CONFIG
      Client-side property to set custom selector ThreadPoolConfig.

      Value is expected to be instance of ThreadPoolConfig, can be null (it won't be used).

      See Also:
  • Method Details