Class WebSocketClient
- java.lang.Object
-
- io.vertx.mutiny.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 io.smallrye.mutiny.Uni<Void>
close()
Close the client.Void
closeAndAwait()
Blocking variant ofclose()
.void
closeAndForget()
Variant ofclose()
that ignores the result of the operation.io.smallrye.mutiny.Uni<WebSocket>
connect(int port, String host, String requestURI)
Connect a WebSocket to the specified port, host and relative request URIio.smallrye.mutiny.Uni<WebSocket>
connect(io.vertx.core.http.WebSocketConnectOptions options)
Connect a WebSocket with the specified options.io.smallrye.mutiny.Uni<WebSocket>
connect(String requestURI)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.io.smallrye.mutiny.Uni<WebSocket>
connect(String host, String requestURI)
Connect a WebSocket to the default client port and specified host and relative request URI.WebSocket
connectAndAwait(int port, String host, String requestURI)
Blocking variant ofconnect(int,String,String)
.WebSocket
connectAndAwait(io.vertx.core.http.WebSocketConnectOptions options)
Blocking variant ofconnect(WebSocketConnectOptions)
.WebSocket
connectAndAwait(String requestURI)
Blocking variant ofconnect(String)
.WebSocket
connectAndAwait(String host, String requestURI)
Blocking variant ofconnect(String,String)
.void
connectAndForget(int port, String host, String requestURI)
Variant ofconnect(int,String,String)
that ignores the result of the operation.void
connectAndForget(io.vertx.core.http.WebSocketConnectOptions options)
Variant ofconnect(WebSocketConnectOptions)
that ignores the result of the operation.void
connectAndForget(String requestURI)
Variant ofconnect(String)
that ignores the result of the operation.void
connectAndForget(String host, String requestURI)
Variant ofconnect(String,String)
that ignores the result of the operation.boolean
equals(Object o)
io.vertx.core.http.WebSocketClient
getDelegate()
int
hashCode()
boolean
isMetricsEnabled()
static WebSocketClient
newInstance(io.vertx.core.http.WebSocketClient arg)
String
toString()
io.smallrye.mutiny.Uni<Boolean>
updateSSLOptions(io.vertx.core.net.SSLOptions options)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).io.smallrye.mutiny.Uni<Boolean>
updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).Boolean
updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options)
Blocking variant ofupdateSSLOptions(SSLOptions)
.Boolean
updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options, boolean force)
Blocking variant ofupdateSSLOptions(SSLOptions,boolean)
.void
updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options)
Variant ofupdateSSLOptions(SSLOptions)
that ignores the result of the operation.void
updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options, boolean force)
Variant ofupdateSSLOptions(SSLOptions,boolean)
that ignores the result of the operation.ClientWebSocket
webSocket()
-
-
-
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:
getDelegate
in interfaceMeasured
-
isMetricsEnabled
public boolean isMetricsEnabled()
- Specified by:
isMetricsEnabled
in interfaceMeasured
- Returns:
true
if metrics are enabled
-
webSocket
public ClientWebSocket webSocket()
- Returns:
- the client WebSocket
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<WebSocket> connect(int port, String host, String requestURI)
Connect a WebSocket to the specified port, host and relative request URIUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
port
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public WebSocket connectAndAwait(int port, String host, String requestURI)
Blocking variant ofconnect(int,String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
port
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- the WebSocket instance produced by the operation.
-
connectAndForget
public void connectAndForget(int port, String host, String requestURI)
Variant ofconnect(int,String,String)
that ignores the result of the operation.This method subscribes on the result of
connect(int,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(int,String,String)
but you don't need to compose it with other operations.- Parameters:
port
- the porthost
- the hostrequestURI
- the relative URI
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<WebSocket> connect(String host, String requestURI)
Connect a WebSocket to the default client port and specified host and relative request URI.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
host
- the hostrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public WebSocket connectAndAwait(String host, String requestURI)
Blocking variant ofconnect(String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
host
- the hostrequestURI
- the relative URI- Returns:
- the WebSocket instance produced by the operation.
-
connectAndForget
public void connectAndForget(String host, String requestURI)
Variant ofconnect(String,String)
that ignores the result of the operation.This method subscribes on the result of
connect(String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(String,String)
but you don't need to compose it with other operations.- Parameters:
host
- the hostrequestURI
- the relative URI
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<WebSocket> connect(String requestURI)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
requestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public WebSocket connectAndAwait(String requestURI)
Blocking variant ofconnect(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
requestURI
- the relative URI- Returns:
- the WebSocket instance produced by the operation.
-
connectAndForget
public void connectAndForget(String requestURI)
Variant ofconnect(String)
that ignores the result of the operation.This method subscribes on the result of
connect(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(String)
but you don't need to compose it with other operations.- Parameters:
requestURI
- the relative URI
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<WebSocket> connect(io.vertx.core.http.WebSocketConnectOptions options)
Connect a WebSocket with the specified options.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the request options- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public WebSocket connectAndAwait(io.vertx.core.http.WebSocketConnectOptions options)
Blocking variant ofconnect(WebSocketConnectOptions)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the request options- Returns:
- the WebSocket instance produced by the operation.
-
connectAndForget
public void connectAndForget(io.vertx.core.http.WebSocketConnectOptions options)
Variant ofconnect(WebSocketConnectOptions)
that ignores the result of the operation.This method subscribes on the result of
connect(WebSocketConnectOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(WebSocketConnectOptions)
but you don't need to compose it with other operations.- Parameters:
options
- the request options
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.SSLOptions options)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the new SSL options- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
updateSSLOptionsAndAwait
public Boolean updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options)
Blocking variant ofupdateSSLOptions(SSLOptions)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the new SSL options- Returns:
- the Boolean instance produced by the operation.
-
updateSSLOptionsAndForget
public void updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options)
Variant ofupdateSSLOptions(SSLOptions)
that ignores the result of the operation.This method subscribes on the result of
updateSSLOptions(SSLOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateSSLOptions(SSLOptions)
but you don't need to compose it with other operations.- Parameters:
options
- the new SSL options
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the new SSL optionsforce
- force the update when options are equals- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
updateSSLOptionsAndAwait
public Boolean updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options, boolean force)
Blocking variant ofupdateSSLOptions(SSLOptions,boolean)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the new SSL optionsforce
- force the update when options are equals- Returns:
- the Boolean instance produced by the operation.
-
updateSSLOptionsAndForget
public void updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options, boolean force)
Variant ofupdateSSLOptions(SSLOptions,boolean)
that ignores the result of the operation.This method subscribes on the result of
updateSSLOptions(SSLOptions,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateSSLOptions(SSLOptions,boolean)
but you don't need to compose it with other operations.- Parameters:
options
- the new SSL optionsforce
- force the update when options are equals
-
close
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
Close the client. Closing will close down any pooled connections. Clients should always be closed after use.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
public Void closeAndAwait()
Blocking variant ofclose()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget()
-
newInstance
public static WebSocketClient newInstance(io.vertx.core.http.WebSocketClient arg)
-
-