Package io.vertx.reactivex.core.http
Class WebSocketClient
- java.lang.Object
-
- io.vertx.reactivex.core.http.WebSocketClient
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<WebSocketClient>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description WebSocketClient(io.vertx.core.http.WebSocketClient delegate)WebSocketClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the client.voidclose(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)Close the client.voidconnect(int port, String host, String requestURI)Connect a WebSocket to the specified port, host and relative request URIvoidconnect(int port, String host, String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)Connect a WebSocket to the specified port, host and relative request URIvoidconnect(io.vertx.core.http.WebSocketConnectOptions options)Connect a WebSocket with the specified options.voidconnect(io.vertx.core.http.WebSocketConnectOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)Connect a WebSocket with the specified options.voidconnect(String requestURI)Connect a WebSocket to the default client port, default client host and specified, relative request URI.voidconnect(String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)Connect a WebSocket to the default client port, default client host and specified, relative request URI.voidconnect(String host, String requestURI)Connect a WebSocket to the default client port and specified host and relative request URI.voidconnect(String host, String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)Connect a WebSocket to the default client port and specified host and relative request URI.booleanequals(Object o)io.vertx.core.http.WebSocketClientgetDelegate()inthashCode()booleanisMetricsEnabled()Whether the metrics are enabled for this measured objectstatic WebSocketClientnewInstance(io.vertx.core.http.WebSocketClient arg)io.reactivex.CompletablerxClose()Close the client.io.reactivex.Single<WebSocket>rxConnect(int port, String host, String requestURI)Connect a WebSocket to the specified port, host and relative request URIio.reactivex.Single<WebSocket>rxConnect(io.vertx.core.http.WebSocketConnectOptions options)Connect a WebSocket with the specified options.io.reactivex.Single<WebSocket>rxConnect(String requestURI)Connect a WebSocket to the default client port, default client host and specified, relative request URI.io.reactivex.Single<WebSocket>rxConnect(String host, String requestURI)Connect a WebSocket to the default client port and specified host and relative request URI.io.reactivex.Single<Boolean>rxUpdateSSLOptions(io.vertx.core.net.SSLOptions options)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).io.reactivex.Single<Boolean>rxUpdateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).StringtoString()voidupdateSSLOptions(io.vertx.core.net.SSLOptions options)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).voidupdateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).voidupdateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).voidupdateSSLOptions(io.vertx.core.net.SSLOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).ClientWebSocketwebSocket()Create a WebSocket that is not yet connected to the server.
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<WebSocketClient> __TYPE_ARG
-
-
Constructor Detail
-
WebSocketClient
public WebSocketClient(io.vertx.core.http.WebSocketClient delegate)
-
WebSocketClient
public WebSocketClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.core.http.WebSocketClient getDelegate()
- Specified by:
getDelegatein interfaceMeasured
-
isMetricsEnabled
public boolean isMetricsEnabled()
Whether the metrics are enabled for this measured object- Specified by:
isMetricsEnabledin interfaceMeasured- Returns:
trueif metrics are enabled
-
webSocket
public ClientWebSocket webSocket()
Create a WebSocket that is not yet connected to the server.- Returns:
- the client WebSocket
-
connect
public void connect(int port, String host, String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)Connect a WebSocket to the specified port, host and relative request URI- Parameters:
port- the porthost- the hostrequestURI- the relative URIhandler- handler that will be called with the WebSocket when connected
-
connect
public void 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
-
rxConnect
public io.reactivex.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:
-
connect
public void connect(String host, String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)
Connect a WebSocket to the default client port and specified host and relative request URI.- Parameters:
host- the hostrequestURI- the relative URIhandler- handler that will be called with the WebSocket when connected
-
connect
public void connect(String host, String requestURI)
Connect a WebSocket to the default client port and specified host and relative request URI.- Parameters:
host- the hostrequestURI- the relative URI
-
rxConnect
public io.reactivex.Single<WebSocket> rxConnect(String host, String requestURI)
Connect a WebSocket to the default client port and specified host and relative request URI.- Parameters:
host- the hostrequestURI- the relative URI- Returns:
-
connect
public void connect(String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.- Parameters:
requestURI- the relative URIhandler- handler that will be called with the WebSocket when connected
-
connect
public void connect(String requestURI)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.- Parameters:
requestURI- the relative URI
-
rxConnect
public io.reactivex.Single<WebSocket> rxConnect(String requestURI)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.- Parameters:
requestURI- the relative URI- Returns:
-
connect
public void connect(io.vertx.core.http.WebSocketConnectOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<WebSocket>> handler)Connect a WebSocket with the specified options.- Parameters:
options- the request optionshandler-
-
connect
public void connect(io.vertx.core.http.WebSocketConnectOptions options)
Connect a WebSocket with the specified options.- Parameters:
options- the request options
-
rxConnect
public io.reactivex.Single<WebSocket> rxConnect(io.vertx.core.http.WebSocketConnectOptions options)
Connect a WebSocket with the specified options.- Parameters:
options- the request options- Returns:
-
updateSSLOptions
public void updateSSLOptions(io.vertx.core.net.SSLOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).- Parameters:
options- the new SSL optionshandler- the update handler
-
updateSSLOptions
public void updateSSLOptions(io.vertx.core.net.SSLOptions options)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).- Parameters:
options- the new SSL options
-
rxUpdateSSLOptions
public io.reactivex.Single<Boolean> rxUpdateSSLOptions(io.vertx.core.net.SSLOptions options)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).- Parameters:
options- the new SSL options- Returns:
-
updateSSLOptions
public void updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).- Parameters:
options- the new SSL optionsforce- force the update when options are equalshandler- the update handler
-
updateSSLOptions
public void updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).- Parameters:
options- the new SSL optionsforce- force the update when options are equals
-
rxUpdateSSLOptions
public io.reactivex.Single<Boolean> rxUpdateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but supplying a handler that will be called when the update happened (or has failed).- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
-
close
public void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Close the client. Closing will close down any pooled connections. Clients should always be closed after use.- Parameters:
handler-
-
close
public void close()
Close the client. Closing will close down any pooled connections. Clients should always be closed after use.
-
rxClose
public io.reactivex.Completable rxClose()
Close the client. Closing will close down any pooled connections. Clients should always be closed after use.- Returns:
-
newInstance
public static WebSocketClient newInstance(io.vertx.core.http.WebSocketClient arg)
-
-