Class WebSocketClient
- All Implemented Interfaces:
RxDelegate,Measured
It allows you to open WebSockets to servers.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completableclose()Close immediately (shutdown(0, TimeUnit.SECONDS).io.reactivex.rxjava3.core.Single<WebSocket>Connect a WebSocket to the specified port, host and relative request URI.io.reactivex.rxjava3.core.Single<WebSocket>connect(WebSocketConnectOptions options) Connect a WebSocket with the specified options.io.reactivex.rxjava3.core.Single<WebSocket>Connect a WebSocket to the default client port, default client host and specified, relative request URI.io.reactivex.rxjava3.core.Single<WebSocket>Connect a WebSocket to the default client port and specified host and relative request URI.booleaninthashCode()booleanWhether the metrics are enabled for this measured objectstatic WebSocketClientio.reactivex.rxjava3.core.CompletablerxClose()Close immediately (shutdown(0, TimeUnit.SECONDS).io.reactivex.rxjava3.core.Single<WebSocket>Connect a WebSocket to the specified port, host and relative request URI.io.reactivex.rxjava3.core.Single<WebSocket>rxConnect(WebSocketConnectOptions options) Connect a WebSocket with the specified options.io.reactivex.rxjava3.core.Single<WebSocket>Connect a WebSocket to the default client port, default client host and specified, relative request URI.io.reactivex.rxjava3.core.Single<WebSocket>Connect a WebSocket to the default client port and specified host and relative request URI.io.reactivex.rxjava3.core.CompletableShutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).io.reactivex.rxjava3.core.CompletablerxShutdown(long timeout, TimeUnit unit) Callsshutdown().io.reactivex.rxjava3.core.CompletablerxShutdown(Duration timeout) Initiate the client shutdown sequence.io.reactivex.rxjava3.core.Single<Boolean>rxUpdateSSLOptions(ClientSSLOptions options) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.io.reactivex.rxjava3.core.Single<Boolean>rxUpdateSSLOptions(ClientSSLOptions options, boolean force) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.io.reactivex.rxjava3.core.Completableshutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).io.reactivex.rxjava3.core.CompletableCallsshutdown().io.reactivex.rxjava3.core.CompletableInitiate the client shutdown sequence.toString()io.reactivex.rxjava3.core.Single<Boolean>updateSSLOptions(ClientSSLOptions options) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.io.reactivex.rxjava3.core.Single<Boolean>updateSSLOptions(ClientSSLOptions options, boolean force) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Create a WebSocket that is not yet connected to the server.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
WebSocketClient
-
WebSocketClient
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceMeasured- Specified by:
getDelegatein interfaceRxDelegate
-
isMetricsEnabled
public boolean isMetricsEnabled()Whether the metrics are enabled for this measured object- Specified by:
isMetricsEnabledin interfaceMeasured- Returns:
trueif metrics are enabled
-
webSocket
Create a WebSocket that is not yet connected to the server.- Returns:
- the client WebSocket
-
connect
public io.reactivex.rxjava3.core.Single<WebSocket> connect(int port, String host, String requestURI) Connect a WebSocket to the specified port, host and relative request URI.- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- a future notified when the WebSocket when connected
-
rxConnect
public io.reactivex.rxjava3.core.Single<WebSocket> rxConnect(int port, String host, String requestURI) Connect a WebSocket to the specified port, host and relative request URI.- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- a future notified when the WebSocket when connected
-
connect
Connect a WebSocket to the default client port and specified host and relative request URI.- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- a future notified when the WebSocket when connected
-
rxConnect
Connect a WebSocket to the default client port and specified host and relative request URI.- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- a future notified when the WebSocket when connected
-
connect
Connect a WebSocket to the default client port, default client host and specified, relative request URI.- Parameters:
requestURI- the relative URI- Returns:
- a future notified when the WebSocket when connected
-
rxConnect
Connect a WebSocket to the default client port, default client host and specified, relative request URI.- Parameters:
requestURI- the relative URI- Returns:
- a future notified when the WebSocket when connected
-
connect
Connect a WebSocket with the specified options.- Parameters:
options- the request options- Returns:
- a future notified when the WebSocket when connected
-
rxConnect
Connect a WebSocket with the specified options.- Parameters:
options- the request options- Returns:
- a future notified when the WebSocket when connected
-
shutdown
public io.reactivex.rxjava3.core.Completable shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).- Returns:
- a future completed when shutdown has completed
-
rxShutdown
public io.reactivex.rxjava3.core.Completable rxShutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).- Returns:
- a future completed when shutdown has completed
-
close
public io.reactivex.rxjava3.core.Completable close()Close immediately (shutdown(0, TimeUnit.SECONDS).- Returns:
- a future notified when the client is closed
-
rxClose
public io.reactivex.rxjava3.core.Completable rxClose()Close immediately (shutdown(0, TimeUnit.SECONDS).- Returns:
- a future notified when the client is closed
-
updateSSLOptions
Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.- Parameters:
options- the new SSL options- Returns:
- a future signaling the update success
-
rxUpdateSSLOptions
Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.- Parameters:
options- the new SSL options- Returns:
- a future signaling the update success
-
updateSSLOptions
public io.reactivex.rxjava3.core.Single<Boolean> updateSSLOptions(ClientSSLOptions options, boolean force) Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The
optionsobject is compared using itsequalsmethod against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, settingforcetotrueforces the update.- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- a future signaling the update success
-
rxUpdateSSLOptions
public io.reactivex.rxjava3.core.Single<Boolean> rxUpdateSSLOptions(ClientSSLOptions options, boolean force) Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The
optionsobject is compared using itsequalsmethod against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, settingforcetotrueforces the update.- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- a future signaling the update success
-
shutdown
Callsshutdown().- Parameters:
timeout-unit-- Returns:
-
rxShutdown
Callsshutdown().- Parameters:
timeout-unit-- Returns:
-
shutdown
Initiate the client shutdown sequence.- Parameters:
timeout- the amount of time after which all resources are forcibly closed- Returns:
- a future notified when the client is closed
-
rxShutdown
Initiate the client shutdown sequence.- Parameters:
timeout- the amount of time after which all resources are forcibly closed- Returns:
- a future notified when the client is closed
-
newInstance
-