Class GrizzlyClientSocket
java.lang.Object
org.glassfish.tyrus.container.grizzly.client.GrizzlyClientSocket
Implementation of the WebSocket interface.
- Author:
- Stepan Kopriva, Pavel Bucek
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.please useClientProperties.PROXY_URI.static final StringDeprecated.static final StringDeprecated. -
Method Summary
-
Field Details
-
PROXY_URI
Deprecated.please useClientProperties.PROXY_URI.Client-side user property to set proxy URI.Value is expected to be
Stringand 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
Deprecated.please useClientProperties.PROXY_HEADERSClient-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, seeClientEndpointConfig.Configurator.beforeRequest(java.util.Map).- See Also:
-
WORKER_THREAD_POOL_CONFIG
Deprecated.Client-side property to set custom workerThreadPoolConfig.Value is expected to be instance of
ThreadPoolConfig, can benull(it won't be used).- See Also:
-
SELECTOR_THREAD_POOL_CONFIG
Deprecated.Client-side property to set custom selectorThreadPoolConfig.Value is expected to be instance of
ThreadPoolConfig, can benull(it won't be used).- See Also:
-
-
Method Details
-
connect
Performs connect to server endpoint.- Throws:
DeploymentException- when there the server endpoint cannot be reached.IOException- when transport fails to start.
-
ClientProperties.PROXY_HEADERS