Class WebSocketClient
- All Implemented Interfaces:
MutinyDelegate
,Measured
It allows you to open WebSockets to servers.
NOTE: This class has been automatically generated from the
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWebSocketClient
(io.vertx.core.http.WebSocketClient delegate) WebSocketClient
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>
close()
Close the client.Blocking variant ofclose()
.void
Variant ofclose()
that ignores the result of the operation.io.smallrye.mutiny.Uni<WebSocket>
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 a WebSocket to the default client port, default client host and specified, relative request URI.io.smallrye.mutiny.Uni<WebSocket>
Connect a WebSocket to the default client port and specified host and relative request URI.connectAndAwait
(int port, String host, String requestURI) Blocking variant ofconnect(int,String,String)
.connectAndAwait
(io.vertx.core.http.WebSocketConnectOptions options) Blocking variant ofconnect(WebSocketConnectOptions)
.connectAndAwait
(String requestURI) Blocking variant ofconnect(String)
.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
io.vertx.core.http.WebSocketClient
int
hashCode()
boolean
static WebSocketClient
newInstance
(io.vertx.core.http.WebSocketClient arg) 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).updateSSLOptionsAndAwait
(io.vertx.core.net.SSLOptions options) Blocking variant ofupdateSSLOptions(SSLOptions)
.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.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
WebSocketClient
public WebSocketClient(io.vertx.core.http.WebSocketClient delegate) -
WebSocketClient
-
-
Method Details
-
getDelegate
public io.vertx.core.http.WebSocketClient getDelegate()- Specified by:
getDelegate
in interfaceMeasured
- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
isMetricsEnabled
public boolean isMetricsEnabled()- Specified by:
isMetricsEnabled
in interfaceMeasured
- Returns:
true
if metrics are enabled
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-