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.
|
Future<NetSocket> |
connect(int port,
String host)
Like
connect(int, String, Handler) but returns a Future of the asynchronous result |
NetClient |
connect(int port,
String host,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
port and host . |
Future<NetSocket> |
connect(int port,
String host,
String serverName)
Like
connect(int, String, String, Handler) but returns a Future of the asynchronous result |
NetClient |
connect(int port,
String host,
String serverName,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
port and host . |
Future<NetSocket> |
connect(SocketAddress remoteAddress)
Like
connect(SocketAddress, Handler) but returns a Future of the asynchronous result |
NetClient |
connect(SocketAddress remoteAddress,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
remoteAddress . |
Future<NetSocket> |
connect(SocketAddress remoteAddress,
String serverName)
Like
connect(SocketAddress, String, Handler) but returns a Future of the asynchronous result |
NetClient |
connect(SocketAddress remoteAddress,
String serverName,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
remoteAddress . |
Future<Void> |
updateSSLOptions(SSLOptions options)
Update the client SSL options.
|
default void |
updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Void>> handler)
Like
updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
isMetricsEnabled
NetClient connect(int port, String host, Handler<AsyncResult<NetSocket>> connectHandler)
port
and host
.
host
can be a valid host name or IP address. The connect is done asynchronously and on success, a
NetSocket
instance is supplied via the connectHandler
instance
port
- the porthost
- the hostFuture<NetSocket> connect(int port, String host)
connect(int, String, Handler)
but returns a Future
of the asynchronous resultNetClient connect(int port, String host, String serverName, Handler<AsyncResult<NetSocket>> connectHandler)
port
and host
.
host
can be a valid host name or IP address. The connect is done asynchronously and on success, a
NetSocket
instance is supplied via the connectHandler
instance
port
- the porthost
- the hostserverName
- the SNI server nameFuture<NetSocket> connect(int port, String host, String serverName)
connect(int, String, String, Handler)
but returns a Future
of the asynchronous resultNetClient connect(SocketAddress remoteAddress, Handler<AsyncResult<NetSocket>> connectHandler)
remoteAddress
.
The connect is done asynchronously and on success, a NetSocket
instance is supplied via the connectHandler
instance
remoteAddress
- the remote addressFuture<NetSocket> connect(SocketAddress remoteAddress)
connect(SocketAddress, Handler)
but returns a Future
of the asynchronous resultNetClient connect(SocketAddress remoteAddress, String serverName, Handler<AsyncResult<NetSocket>> connectHandler)
remoteAddress
.
The connect is done asynchronously and on success, a NetSocket
instance is supplied via the connectHandler
instance
remoteAddress
- the remote addressserverName
- the SNI server nameFuture<NetSocket> connect(SocketAddress remoteAddress, String serverName)
connect(SocketAddress, String, Handler)
but returns a Future
of the asynchronous resultvoid close(Handler<AsyncResult<Void>> handler)
Any sockets which have not been closed manually will be closed here. The close is asynchronous and may not complete until some time after the method has returned.
Future<Void> close()
close(Handler)
but returns a Future
of the asynchronous resultFuture<Void> updateSSLOptions(SSLOptions options)
options
- the new SSL optionsdefault void updateSSLOptions(SSLOptions options, Handler<AsyncResult<Void>> 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 handlerCopyright © 2024 Eclipse. All rights reserved.