Top Fields Constructors Methods
io.vertx.core.http.impl

public Class SharedWebSocketClient

extends Object
implements WebSocketClient
Class Inheritance
All Implemented Interfaces
io.vertx.core.http.WebSocketClient, io.vertx.core.metrics.Measured
Imports
io.vertx.core.AsyncResult, .Future, .Handler, io.vertx.core.http.ClientWebSocket, .WebSocket, .WebSocketClient, .WebSocketConnectOptions, io.vertx.core.impl.CloseFuture, .ContextInternal, .VertxInternal, io.vertx.core.impl.future.PromiseInternal, io.vertx.core.net.SSLOptions, java.util.List

Field Summary

Modifier and TypeField and Description
private final CloseFuture
private final WebSocketClient
public static final String
private final VertxInternal

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close(Handler<AsyncResult<Void>> handler)

Implements io.vertx.core.http.WebSocketClient.close.

Close the client.

public Future<Void>
close()

Implements io.vertx.core.http.WebSocketClient.close.

Like close(Handler) but returns a Future of the asynchronous result

public void
connect(WebSocketConnectOptions
the request options
options
,
Handler<AsyncResult<WebSocket>> handler)

Implements io.vertx.core.http.WebSocketClient.connect.

Connect a WebSocket with the specified options.

public Future<WebSocket>
connect(WebSocketConnectOptions options)

Implements io.vertx.core.http.WebSocketClient.connect.

Like connect(WebSocketConnectOptions, Handler) but returns a Future of the asynchronous result

public boolean
isMetricsEnabled()

Overrides default io.vertx.core.metrics.Measured.isMetricsEnabled.

Whether the metrics are enabled for this measured object

public Future<Boolean>
updateSSLOptions(SSLOptions
the new SSL options
options
,
boolean
force the update when options are equals
force
)

Implements io.vertx.core.http.WebSocketClient.updateSSLOptions.

Update the client with new SSL options, the update happens if the options object is valid and different from the existing options object.

public ClientWebSocket
webSocket()

Implements io.vertx.core.http.WebSocketClient.webSocket.

Create a WebSocket that is not yet connected to the server.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closeFutureback to summary
private final CloseFuture closeFuture
delegateback to summary
private final WebSocketClient delegate
SHARED_MAP_NAMEback to summary
public static final String SHARED_MAP_NAME
vertxback to summary
private final VertxInternal vertx

Constructor Detail

SharedWebSocketClientback to summary
public SharedWebSocketClient(VertxInternal vertx, CloseFuture closeFuture, WebSocketClient delegate)

Method Detail

closeback to summary
public void close(Handler<AsyncResult<Void>> handler)

Implements io.vertx.core.http.WebSocketClient.close.

Doc from io.vertx.core.http.WebSocketClient.close.

Close the client. Closing will close down any pooled connections. Clients should always be closed after use.

Annotations
@Override
closeback to summary
public Future<Void> close()

Implements io.vertx.core.http.WebSocketClient.close.

Doc from io.vertx.core.http.WebSocketClient.close.

Like close(Handler) but returns a Future of the asynchronous result

Annotations
@Override
connectback to summary
public void connect(WebSocketConnectOptions options, Handler<AsyncResult<WebSocket>> handler)

Implements io.vertx.core.http.WebSocketClient.connect.

Doc from io.vertx.core.http.WebSocketClient.connect.

Connect a WebSocket with the specified options.

Parameters
options:WebSocketConnectOptions

the request options

Annotations
@Override
connectback to summary
public Future<WebSocket> connect(WebSocketConnectOptions options)

Implements io.vertx.core.http.WebSocketClient.connect.

Doc from io.vertx.core.http.WebSocketClient.connect.

Like connect(WebSocketConnectOptions, Handler) but returns a Future of the asynchronous result

Annotations
@Override
isMetricsEnabledback to summary
public boolean isMetricsEnabled()

Overrides default io.vertx.core.metrics.Measured.isMetricsEnabled.

Doc from io.vertx.core.metrics.Measured.isMetricsEnabled.

Whether the metrics are enabled for this measured object

Returns:boolean

true if metrics are enabled

Annotations
@Override
updateSSLOptionsback to summary
public Future<Boolean> updateSSLOptions(SSLOptions options, boolean force)

Implements io.vertx.core.http.WebSocketClient.updateSSLOptions.

Doc from io.vertx.core.http.WebSocketClient.updateSSLOptions.

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.

Parameters
options:SSLOptions

the new SSL options

force:boolean

force the update when options are equals

Returns:Future<Boolean>

a future signaling the update success

Annotations
@Override
webSocketback to summary
public ClientWebSocket webSocket()

Implements io.vertx.core.http.WebSocketClient.webSocket.

Doc from io.vertx.core.http.WebSocketClient.webSocket.

Create a WebSocket that is not yet connected to the server.

Returns:ClientWebSocket

the client WebSocket

Annotations
@Override