HttpClient connect a WebSocket.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| public static final boolean | DEFAULT_ALLOW_ORIGIN_HEADER
The default WebSocket allow origin header = |
| public static final ProxyOptions | DEFAULT_PROXY_OPTIONS
Hides io. null
|
| public static final boolean | DEFAULT_REGISTER_WRITE_HANDLERS
Whether write-handlers should be registered by default = false. |
| public static final List | DEFAULT_SUB_PROTOCOLS
The default WebSocket sub protocols = |
| public static final WebsocketVersion | DEFAULT_VERSION
The default WebSocket version = |
| private ProxyOptions | |
| private boolean | |
| private List | |
| private WebsocketVersion |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | WebSocketConnectOptions(JsonObject json)
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Method and Description |
|---|---|
| public WebSocketConnectOptions | addHeader(String
the header key key, String the header value value)Overrides io. Add a request header. |
| public WebSocketConnectOptions | addHeader(CharSequence
the header key key, CharSequence the header value value)Overrides io. Add a request header. |
| public WebSocketConnectOptions | addHeader(CharSequence key, Iterable<CharSequence> values)
Overrides io.
|
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlyAdd a WebSocket sub protocol to use. |
| public boolean | |
| public ProxyOptions | Returns: proxy options overrideOverrides io. Get the proxy options override for connections |
| public List | |
| public WebsocketVersion | |
| public boolean | Returns: true if write-handlers should be registered on the io., otherwise false
|
| public WebSocketConnectOptions | putHeader(String
the header key key, String the header value value)Overrides io. Set a request header. |
| public WebSocketConnectOptions | putHeader(CharSequence
the header key key, CharSequence the header value value)Overrides io. Set a request header. |
| public WebSocketConnectOptions | putHeader(CharSequence key, Iterable<CharSequence> values)
Overrides io.
|
| public WebSocketConnectOptions | setAbsoluteURI(String
the uri to use absoluteURI)Overrides io. Parse an absolute URI to use, this will update the |
| public WebSocketConnectOptions | setAbsoluteURI(URL
the uri to use url)Overrides io. Like |
| private void | |
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlywhether to add the allowOriginHeader)origin header to the WebSocket handshake requestSet whether to add the |
| public WebSocketConnectOptions | setConnectTimeout(long
the amount of time in milliseconds. timeout)Overrides io. Sets the amount of time after which, if the request is not obtained from the client within the timeout period,
the |
| public WebSocketConnectOptions | setFollowRedirects(Boolean
whether to follow redirect followRedirects)Overrides io. Set whether to follow HTTP redirect |
| public WebSocketConnectOptions | setHeaders(MultiMap
the headers headers)Overrides io. Set request headers from a multi-map. |
| public WebSocketConnectOptions | setHost(String host)
Overrides io. Set the host name to be used by the client request. |
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlythe amount of time in milliseconds. timeout)Overrides io. Sets the amount of time after which if the WebSocket handshake does not happen within the timeout period an
|
| public WebSocketConnectOptions | setMethod(HttpMethod method)
Overrides io. Set the HTTP method to be used by the client request. |
| public WebSocketConnectOptions | setPort(Integer port)
Overrides io. Set the port to be used by the client request. |
| public RequestOptions | Returns: a reference to this, so the API can be used fluentlyproxy options override object proxyOptions)Overrides io. Override the |
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlytrue to register write-handlers registerWriteHandlers)Whether write-handlers should be registered on the |
| public WebSocketConnectOptions | setServer(SocketAddress server)
Overrides io. Set the server address to be used by the client request. |
| public WebSocketConnectOptions | setSsl(Boolean
true if enabled ssl)Overrides io. Set whether SSL/TLS is enabled. |
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlySet the WebSocket sub protocols to use. |
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlythe amount of time in milliseconds. timeout)Overrides io. Sets the amount of time after which if the WebSocket handshake does not happen within the timeout period an
|
| public WebSocketConnectOptions | setTraceOperation(String
the override op)Overrides io. Override the operation the tracer use for this request. |
| public WebSocketConnectOptions | setURI(String
the relative uri uri)Overrides io. Set the request relative URI. |
| public WebSocketConnectOptions | Returns: a reference to this, so the API can be used fluentlySet the WebSocket version. |
| public JsonObject | toJson()
Overrides io.
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
|
| allowOriginHeader | back to summary |
|---|---|
| private boolean allowOriginHeader | |
| DEFAULT_ALLOW_ORIGIN_HEADER | back to summary |
|---|---|
| public static final boolean DEFAULT_ALLOW_ORIGIN_HEADER The default WebSocket allow origin header = | |
| DEFAULT_PROXY_OPTIONS | back to summary |
|---|---|
| public static final ProxyOptions DEFAULT_PROXY_OPTIONS Hides io. The default value for proxy options = | |
| DEFAULT_REGISTER_WRITE_HANDLERS | back to summary |
|---|---|
| public static final boolean DEFAULT_REGISTER_WRITE_HANDLERS Whether write-handlers should be registered by default = false. | |
| DEFAULT_SUB_PROTOCOLS | back to summary |
|---|---|
| public static final List<String> DEFAULT_SUB_PROTOCOLS The default WebSocket sub protocols = | |
| DEFAULT_VERSION | back to summary |
|---|---|
| public static final WebsocketVersion DEFAULT_VERSION The default WebSocket version = | |
| proxyOptions | back to summary |
|---|---|
| private ProxyOptions proxyOptions | |
| registerWriteHandlers | back to summary |
|---|---|
| private boolean registerWriteHandlers | |
| subProtocols | back to summary |
|---|---|
| private List<String> subProtocols | |
| version | back to summary |
|---|---|
| private WebsocketVersion version | |
| WebSocketConnectOptions | back to summary |
|---|---|
| public WebSocketConnectOptions() | |
| WebSocketConnectOptions | back to summary |
|---|---|
| public WebSocketConnectOptions(WebSocketConnectOptions other) | |
| WebSocketConnectOptions | back to summary |
|---|---|
| public WebSocketConnectOptions(JsonObject json)
References Deprecated
See corresponding docs for further information. | |
| addHeader | back to summary |
|---|---|
| public WebSocketConnectOptions addHeader(String key, String value) Overrides io. Doc from io. Add a request header.
| |
| addHeader | back to summary |
|---|---|
| public WebSocketConnectOptions addHeader(CharSequence key, CharSequence value) Overrides io. Doc from io. Add a request header.
| |
| addHeader | back to summary |
|---|---|
| public WebSocketConnectOptions addHeader(CharSequence key, Iterable<CharSequence> values) Overrides io.
| |
| addSubProtocol | back to summary |
|---|---|
| public WebSocketConnectOptions addSubProtocol(String subprotocol) Add a WebSocket sub protocol to use.
| |
| getAllowOriginHeader | back to summary |
|---|---|
public boolean getAllowOriginHeader()
| |
| getProxyOptions | back to summary |
|---|---|
| public ProxyOptions getProxyOptions() Overrides io. Get the proxy options override for connections
| |
| getSubProtocols | back to summary |
|---|---|
| public List | |
| getVersion | back to summary |
|---|---|
public WebsocketVersion getVersion()
| |
| isRegisterWriteHandlers | back to summary |
|---|---|
public boolean isRegisterWriteHandlers()
| |
| putHeader | back to summary |
|---|---|
| public WebSocketConnectOptions putHeader(String key, String value) Overrides io. Doc from io. Set a request header.
| |
| putHeader | back to summary |
|---|---|
| public WebSocketConnectOptions putHeader(CharSequence key, CharSequence value) Overrides io. Doc from io. Set a request header.
| |
| putHeader | back to summary |
|---|---|
| public WebSocketConnectOptions putHeader(CharSequence key, Iterable<CharSequence> values) Overrides io.
| |
| setAbsoluteURI | back to summary |
|---|---|
| public WebSocketConnectOptions setAbsoluteURI(String absoluteURI) Overrides io. Doc from io. Parse an absolute URI to use, this will update the
| |
| setAbsoluteURI | back to summary |
|---|---|
| public WebSocketConnectOptions setAbsoluteURI(URL url) Overrides io. Doc from io. Like
| |
| setAbsoluteURI | back to summary |
|---|---|
| private void setAbsoluteURI(URI uri) | |
| setAllowOriginHeader | back to summary |
|---|---|
| public WebSocketConnectOptions setAllowOriginHeader(boolean allowOriginHeader) Set whether to add the Set to
| |
| setConnectTimeout | back to summary |
|---|---|
| public WebSocketConnectOptions setConnectTimeout(long timeout) Overrides io. Doc from io. Sets the amount of time after which, if the request is not obtained from the client within the timeout period,
the
| |
| setFollowRedirects | back to summary |
|---|---|
| public WebSocketConnectOptions setFollowRedirects(Boolean followRedirects) Overrides io. Doc from io. Set whether to follow HTTP redirect
| |
| setHeaders | back to summary |
|---|---|
| public WebSocketConnectOptions setHeaders(MultiMap headers) Overrides io. Doc from io. Set request headers from a multi-map.
| |
| setHost | back to summary |
|---|---|
| public WebSocketConnectOptions setHost(String host) Overrides io. Doc from io. Set the host name to be used by the client request.
| |
| setIdleTimeout | back to summary |
|---|---|
| public WebSocketConnectOptions setIdleTimeout(long timeout) Overrides io. Sets the amount of time after which if the WebSocket handshake does not happen within the timeout period an
| |
| setMethod | back to summary |
|---|---|
| public WebSocketConnectOptions setMethod(HttpMethod method) Overrides io. Doc from io. Set the HTTP method to be used by the client request.
| |
| setPort | back to summary |
|---|---|
| public WebSocketConnectOptions setPort(Integer port) Overrides io. Doc from io. Set the port to be used by the client request.
| |
| setProxyOptions | back to summary |
|---|---|
| public RequestOptions setProxyOptions(ProxyOptions proxyOptions) Overrides io. Override the
| |
| setRegisterWriteHandlers | back to summary |
|---|---|
| public WebSocketConnectOptions setRegisterWriteHandlers(boolean registerWriteHandlers) Whether write-handlers should be registered on the
Defaults to
| |
| setServer | back to summary |
|---|---|
| public WebSocketConnectOptions setServer(SocketAddress server) Overrides io. Doc from io. Set the server address to be used by the client request. When the server address is Use this when you want to connect to a specific server address without name resolution.
| |
| setSsl | back to summary |
|---|---|
| public WebSocketConnectOptions setSsl(Boolean ssl) Overrides io. Doc from io. Set whether SSL/TLS is enabled.
| |
| setSubProtocols | back to summary |
|---|---|
| public WebSocketConnectOptions setSubProtocols(List<String> subProtocols) Set the WebSocket sub protocols to use.
| |
| setTimeout | back to summary |
|---|---|
| public WebSocketConnectOptions setTimeout(long timeout) Overrides io. Sets the amount of time after which if the WebSocket handshake does not happen within the timeout period an
| |
| setTraceOperation | back to summary |
|---|---|
| public WebSocketConnectOptions setTraceOperation(String op) Overrides io. Doc from io. Override the operation the tracer use for this request. When no operation is set, the HTTP method is used instead.
| |
| setURI | back to summary |
|---|---|
| public WebSocketConnectOptions setURI(String uri) Overrides io. Doc from io. Set the request relative URI.
| |
| setVersion | back to summary |
|---|---|
| public WebSocketConnectOptions setVersion(WebsocketVersion version) Set the WebSocket version.
| |
| toJson | back to summary |
|---|---|
| public JsonObject toJson() Overrides io. References Deprecated
See corresponding docs for further information.
| |