public class NetClient extends Object implements Measured
Multiple connections to different servers can be made using the same instance.
This client supports a configurable number of connection attempts and a configurable delay between attempts.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<NetClient> |
__TYPE_ARG |
Constructor and Description |
---|
NetClient(NetClient delegate) |
NetClient(Object delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the client.
|
void |
close(Handler<AsyncResult<Void>> handler)
Close the client.
|
NetClient |
connect(int port,
String host)
Open a connection to a server at the specific
port and host . |
NetClient |
connect(int port,
String host,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
port and host . |
NetClient |
connect(int port,
String host,
String serverName)
Open a connection to a server at the specific
port and host . |
NetClient |
connect(int port,
String host,
String serverName,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
port and host . |
NetClient |
connect(SocketAddress remoteAddress)
Open a connection to a server at the specific
remoteAddress . |
NetClient |
connect(SocketAddress remoteAddress,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
remoteAddress . |
NetClient |
connect(SocketAddress remoteAddress,
String serverName)
Open a connection to a server at the specific
remoteAddress . |
NetClient |
connect(SocketAddress remoteAddress,
String serverName,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
remoteAddress . |
boolean |
equals(Object o) |
NetClient |
getDelegate() |
int |
hashCode() |
boolean |
isMetricsEnabled()
Whether the metrics are enabled for this measured object
|
static NetClient |
newInstance(NetClient arg) |
Single<Void> |
rxClose()
Close the client.
|
Single<NetSocket> |
rxConnect(int port,
String host)
Open a connection to a server at the specific
port and host . |
Single<NetSocket> |
rxConnect(int port,
String host,
String serverName)
Open a connection to a server at the specific
port and host . |
Single<NetSocket> |
rxConnect(SocketAddress remoteAddress)
Open a connection to a server at the specific
remoteAddress . |
Single<NetSocket> |
rxConnect(SocketAddress remoteAddress,
String serverName)
Open a connection to a server at the specific
remoteAddress . |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<NetClient> __TYPE_ARG
public NetClient(NetClient delegate)
public NetClient(Object delegate)
public NetClient getDelegate()
getDelegate
in interface Measured
public boolean isMetricsEnabled()
isMetricsEnabled
in interface Measured
true
if metrics are enabledpublic 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 hostconnectHandler
- public NetClient connect(int port, String host)
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 hostpublic Single<NetSocket> rxConnect(int port, String host)
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 hostpublic NetClient 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 nameconnectHandler
- public NetClient connect(int port, String host, String serverName)
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 namepublic Single<NetSocket> rxConnect(int port, String host, String serverName)
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 namepublic NetClient 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 addressconnectHandler
- public NetClient connect(SocketAddress remoteAddress)
remoteAddress
.
The connect is done asynchronously and on success, a NetSocket
instance is supplied via the connectHandler
instance
remoteAddress
- the remote addresspublic Single<NetSocket> rxConnect(SocketAddress remoteAddress)
remoteAddress
.
The connect is done asynchronously and on success, a NetSocket
instance is supplied via the connectHandler
instance
remoteAddress
- the remote addresspublic NetClient 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 nameconnectHandler
- public NetClient connect(SocketAddress remoteAddress, String serverName)
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 namepublic Single<NetSocket> rxConnect(SocketAddress remoteAddress, String serverName)
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 namepublic void 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.
handler
- public void close()
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.
public Single<Void> rxClose()
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.
Copyright © 2023 Eclipse. All rights reserved.