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.
- Author:
- Tim Fox
- See Also:
-
WebSocketClient
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vertx.mutiny.core.metrics.Measured
Measured.MeasuredImpl -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWebSocketClient(io.vertx.core.http.WebSocketClient delegate) Create a new instance ofWebSocketClientdelegating to the given (non-null) instance ofWebSocketClient.WebSocketClient(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>close()Close immediately (shutdown(0, TimeUnit.SECONDS).voidClose immediately (shutdown(0, TimeUnit.SECONDS).Close immediately (shutdown(0, TimeUnit.SECONDS).io.smallrye.mutiny.Uni<WebSocket>Connect a WebSocket to the specified port, host and relative request URI.io.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) Connect a WebSocket to the specified port, host and relative request URI.connectAndAwait(io.vertx.core.http.WebSocketConnectOptions options) Connect a WebSocket with the specified options.connectAndAwait(String requestURI) Connect a WebSocket to the default client port, default client host and specified, relative request URI.connectAndAwait(String host, String requestURI) Connect a WebSocket to the default client port and specified host and relative request URI.connectAndForget(int port, String host, String requestURI) Connect a WebSocket to the specified port, host and relative request URI.connectAndForget(io.vertx.core.http.WebSocketConnectOptions options) Connect a WebSocket with the specified options.connectAndForget(String requestURI) Connect a WebSocket to the default client port, default client host and specified, relative request URI.connectAndForget(String host, String requestURI) Connect a WebSocket to the default client port and specified host and relative request URI.booleanio.vertx.core.http.WebSocketClientGet the delegate instance.inthashCode()booleanWhether the metrics are enabled for this measured objectstatic WebSocketClientnewInstance(io.vertx.core.http.WebSocketClient delegate) Creates a new instance of theWebSocketClient.io.smallrye.mutiny.Uni<Void>shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).io.smallrye.mutiny.Uni<Void>Callsshutdown(Duration).io.smallrye.mutiny.Uni<Void>Initiate the client shutdown sequence.voidShutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).voidshutdownAndAwait(long timeout, TimeUnit unit) Callsshutdown(Duration).voidshutdownAndAwait(Duration timeout) Initiate the client shutdown sequence.Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).shutdownAndForget(long timeout, TimeUnit unit) Callsshutdown(Duration).shutdownAndForget(Duration timeout) Initiate the client shutdown sequence.toString()io.smallrye.mutiny.Uni<Boolean>updateSSLOptions(io.vertx.core.net.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.smallrye.mutiny.Uni<Boolean>updateSSLOptions(io.vertx.core.net.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.updateSSLOptionsAndAwait(io.vertx.core.net.ClientSSLOptions options) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptionsAndAwait(io.vertx.core.net.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.updateSSLOptionsAndForget(io.vertx.core.net.ClientSSLOptions options) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptionsAndForget(io.vertx.core.net.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
public WebSocketClient(io.vertx.core.http.WebSocketClient delegate) Create a new instance ofWebSocketClientdelegating to the given (non-null) instance ofWebSocketClient. -
WebSocketClient
-
-
Method Details
-
getDelegate
public io.vertx.core.http.WebSocketClient getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMeasured- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
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 URI.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.connect(int, String, String)
-
connectAndAwait
Connect a WebSocket to the specified port, host and relative request URI.Unlike the bare Vert.x variant, this method returns a
WebSocket. This method awaits indefinitely 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 aRuntimeException).- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- The operation result
- See Also:
-
WebSocketClient.connect(int, String, String)
-
connectAndForget
Connect a WebSocket to the specified port, host and relative request URI.Unlike the bare Vert.x variant, this method ignores the
WebSocketresult or any failure.- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.connect(int, String, String)
-
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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.connect(String, String)
-
connectAndAwait
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
WebSocket. This method awaits indefinitely 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 aRuntimeException).- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- The operation result
- See Also:
-
WebSocketClient.connect(String, String)
-
connectAndForget
Connect a WebSocket to the default client port and specified host and relative request URI.Unlike the bare Vert.x variant, this method ignores the
WebSocketresult or any failure.- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.connect(String, String)
-
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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
requestURI- the relative URI- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.connect(String)
-
connectAndAwait
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
WebSocket. This method awaits indefinitely 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 aRuntimeException).- Parameters:
requestURI- the relative URI- Returns:
- The operation result
- See Also:
-
WebSocketClient.connect(String)
-
connectAndForget
Connect a WebSocket to the default client port, default client host and specified, relative request URI.Unlike the bare Vert.x variant, this method ignores the
WebSocketresult or any failure.- Parameters:
requestURI- the relative URI- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.connect(String)
-
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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
options- the request options- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.connect(WebSocketConnectOptions)
-
connectAndAwait
Connect a WebSocket with the specified options.Unlike the bare Vert.x variant, this method returns a
WebSocket. This method awaits indefinitely 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 aRuntimeException).- Parameters:
options- the request options- Returns:
- The operation result
- See Also:
-
WebSocketClient.connect(WebSocketConnectOptions)
-
connectAndForget
Connect a WebSocket with the specified options.Unlike the bare Vert.x variant, this method ignores the
WebSocketresult or any failure.- Parameters:
options- the request options- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.connect(WebSocketConnectOptions)
-
shutdown
Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.shutdown()
-
shutdownAndAwait
public void shutdownAndAwait()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
WebSocketClient.shutdown()
-
shutdownAndForget
Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.shutdown()
-
close
Close immediately (shutdown(0, TimeUnit.SECONDS).Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.close()
-
closeAndAwait
public void closeAndAwait()Close immediately (shutdown(0, TimeUnit.SECONDS).Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
WebSocketClient.close()
-
closeAndForget
Close immediately (shutdown(0, TimeUnit.SECONDS).Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.close()
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.ClientSSLOptions options) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
options- the new SSL options- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.updateSSLOptions(ClientSSLOptions)
-
updateSSLOptionsAndAwait
Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Unlike the bare Vert.x variant, this method returns a
Boolean. This method awaits indefinitely 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 aRuntimeException).- Parameters:
options- the new SSL options- Returns:
- The operation result
- See Also:
-
WebSocketClient.updateSSLOptions(ClientSSLOptions)
-
updateSSLOptionsAndForget
Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Unlike the bare Vert.x variant, this method ignores the
Booleanresult or any failure.- Parameters:
options- the new SSL options- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.updateSSLOptions(ClientSSLOptions)
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.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.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.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:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.updateSSLOptions(ClientSSLOptions, boolean)
-
updateSSLOptionsAndAwait
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.Unlike the bare Vert.x variant, this method returns a
Boolean. This method awaits indefinitely 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 aRuntimeException).- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- The operation result
- See Also:
-
WebSocketClient.updateSSLOptions(ClientSSLOptions, boolean)
-
updateSSLOptionsAndForget
public WebSocketClient updateSSLOptionsAndForget(io.vertx.core.net.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.Unlike the bare Vert.x variant, this method ignores the
Booleanresult or any failure.- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.updateSSLOptions(ClientSSLOptions, boolean)
-
shutdown
Callsshutdown(Duration).Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.shutdown(long, TimeUnit)
-
shutdownAndAwait
Callsshutdown(Duration).Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
WebSocketClient.shutdown(long, TimeUnit)
-
shutdownAndForget
Callsshutdown(Duration).Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.shutdown(long, TimeUnit)
-
shutdown
Initiate the client shutdown sequence.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
timeout- the amount of time after which all resources are forcibly closed- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebSocketClient.shutdown(Duration)
-
shutdownAndAwait
Initiate the client shutdown sequence.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- Parameters:
timeout- the amount of time after which all resources are forcibly closed- See Also:
-
WebSocketClient.shutdown(Duration)
-
shutdownAndForget
Initiate the client shutdown sequence.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
timeout- the amount of time after which all resources are forcibly closed- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebSocketClient.shutdown(Duration)
-
webSocket
Create a WebSocket that is not yet connected to the server.- Returns:
- the client WebSocket
-
isMetricsEnabled
public boolean isMetricsEnabled()Whether the metrics are enabled for this measured object- Specified by:
isMetricsEnabledin interfaceMeasured- Returns:
trueif metrics are enabled
-
newInstance
Creates a new instance of theWebSocketClient. -
hashCode
public int hashCode() -
equals
-
toString
-