Modifier and Type | Method and Description |
---|---|
Future<Void> |
close()
Like
close(Handler) but returns a Future of the asynchronous result |
void |
close(Handler<AsyncResult<Void>> handler)
Close the client.
|
default Future<WebSocket> |
connect(int port,
String host,
String requestURI)
Like
connect(int, String, String, Handler) but returns a Future of the asynchronous result |
default void |
connect(int port,
String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the specified port, host and relative request URI
|
default Future<WebSocket> |
connect(String requestURI)
Like
connect(String, Handler) but returns a Future of the asynchronous result |
default void |
connect(String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.
|
default Future<WebSocket> |
connect(String host,
String requestURI)
Like
connect(String, String, Handler) but returns a Future of the asynchronous result |
default void |
connect(String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the default client port and specified host and relative request URI.
|
Future<WebSocket> |
connect(WebSocketConnectOptions options)
Like
connect(WebSocketConnectOptions, Handler) but returns a Future of the asynchronous result |
void |
connect(WebSocketConnectOptions options,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket with the specified options.
|
default Future<Boolean> |
updateSSLOptions(SSLOptions options)
Update the client with new SSL
options , the update happens if the options object is valid and different
from the existing options object. |
Future<Boolean> |
updateSSLOptions(SSLOptions 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. |
default void |
updateSSLOptions(SSLOptions options,
boolean force,
Handler<AsyncResult<Boolean>> handler)
Like
updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Boolean>> handler)
Like
updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
ClientWebSocket |
webSocket()
Create a WebSocket that is not yet connected to the server.
|
isMetricsEnabled
ClientWebSocket webSocket()
default void connect(int port, String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
port
- the porthost
- the hostrequestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connecteddefault Future<WebSocket> connect(int port, String host, String requestURI)
connect(int, String, String, Handler)
but returns a Future
of the asynchronous resultdefault void connect(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
host
- the hostrequestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connecteddefault Future<WebSocket> connect(String host, String requestURI)
connect(String, String, Handler)
but returns a Future
of the asynchronous resultdefault void connect(String requestURI, Handler<AsyncResult<WebSocket>> handler)
requestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connecteddefault Future<WebSocket> connect(String requestURI)
connect(String, Handler)
but returns a Future
of the asynchronous resultvoid connect(WebSocketConnectOptions options, Handler<AsyncResult<WebSocket>> handler)
options
- the request optionsFuture<WebSocket> connect(WebSocketConnectOptions options)
connect(WebSocketConnectOptions, Handler)
but returns a Future
of the asynchronous resultdefault Future<Boolean> updateSSLOptions(SSLOptions options)
options
, the update happens if the options object is valid and different
from the existing options object.options
- the new SSL optionsdefault void updateSSLOptions(SSLOptions options, Handler<AsyncResult<Boolean>> handler)
updateSSLOptions(SSLOptions)
but supplying a handler that will be called when the update
happened (or has failed).options
- the new SSL optionshandler
- the update handlerFuture<Boolean> updateSSLOptions(SSLOptions 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 options
object is compared using its equals
method 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, setting force
to true
forces the update.
options
- the new SSL optionsforce
- force the update when options are equalsdefault void updateSSLOptions(SSLOptions options, boolean force, Handler<AsyncResult<Boolean>> handler)
updateSSLOptions(SSLOptions)
but supplying a handler that will be called when the update
happened (or has failed).options
- the new SSL optionsforce
- force the update when options are equalshandler
- the update handlervoid close(Handler<AsyncResult<Void>> handler)
Future<Void> close()
close(Handler)
but returns a Future
of the asynchronous resultCopyright © 2024 Eclipse. All rights reserved.