Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<NetServer> |
__TYPE_ARG |
Constructor and Description |
---|
NetServer(NetServer delegate) |
NetServer(Object delegate) |
Modifier and Type | Method and Description |
---|---|
int |
actualPort()
The actual port the server is listening on.
|
void |
close()
Close the server.
|
void |
close(Handler<AsyncResult<Void>> completionHandler)
Like
close() but supplying a handler that will be notified when close is complete. |
NetServer |
connectHandler(Handler<NetSocket> handler)
Supply a connect handler for this server.
|
ReadStream<NetSocket> |
connectStream()
Return the connect stream for this server.
|
boolean |
equals(Object o) |
NetServer |
getDelegate() |
int |
hashCode() |
boolean |
isMetricsEnabled()
Whether the metrics are enabled for this measured object
|
NetServer |
listen()
Start listening on the port and host as configured in the
NetServerOptions used when
creating the server. |
NetServer |
listen(Handler<AsyncResult<NetServer>> listenHandler)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
NetServer |
listen(int port)
Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the
NetServerOptions used when creating the server. |
NetServer |
listen(int port,
Handler<AsyncResult<NetServer>> listenHandler)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
NetServer |
listen(int port,
String host)
Start listening on the specified port and host, ignoring port and host configured in the
NetServerOptions used when
creating the server. |
NetServer |
listen(int port,
String host,
Handler<AsyncResult<NetServer>> listenHandler)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
NetServer |
listen(SocketAddress localAddress)
Start listening on the specified local address, ignoring port and host configured in the
NetServerOptions used when
creating the server. |
NetServer |
listen(SocketAddress localAddress,
Handler<AsyncResult<NetServer>> listenHandler)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
static NetServer |
newInstance(NetServer arg) |
Completable |
rxClose()
Like
close() but supplying a handler that will be notified when close is complete. |
Single<NetServer> |
rxListen()
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
Single<NetServer> |
rxListen(int port)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
Single<NetServer> |
rxListen(int port,
String host)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
Single<NetServer> |
rxListen(SocketAddress localAddress)
Like
listen() but providing a handler that will be notified when the server is listening, or fails. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<NetServer> __TYPE_ARG
public NetServer(NetServer delegate)
public NetServer(Object delegate)
public NetServer getDelegate()
getDelegate
in interface Measured
public boolean isMetricsEnabled()
isMetricsEnabled
in interface Measured
true
if metrics are enabledpublic ReadStream<NetSocket> connectStream()
NetSocket
and passes it to the
connect stream .public NetServer connectHandler(Handler<NetSocket> handler)
NetSocket
and passes it to the
connect handler.handler
- public NetServer listen()
NetServerOptions
used when
creating the server.
The server may not be listening until some time after the call to listen has returned.
public NetServer listen(Handler<AsyncResult<NetServer>> listenHandler)
listen()
but providing a handler that will be notified when the server is listening, or fails.listenHandler
- handler that will be notified when listening or failedpublic Single<NetServer> rxListen()
listen()
but providing a handler that will be notified when the server is listening, or fails.public NetServer listen(int port, String host)
NetServerOptions
used when
creating the server.
Port 0
can be specified meaning "choose an random port".
Host 0.0.0.0
can be specified meaning "listen on all available interfaces".
The server may not be listening until some time after the call to listen has returned.
port
- host
- public NetServer listen(int port, String host, Handler<AsyncResult<NetServer>> listenHandler)
listen()
but providing a handler that will be notified when the server is listening, or fails.port
- the port to listen onhost
- the host to listen onlistenHandler
- handler that will be notified when listening or failedpublic Single<NetServer> rxListen(int port, String host)
listen()
but providing a handler that will be notified when the server is listening, or fails.port
- the port to listen onhost
- the host to listen onpublic NetServer listen(int port)
NetServerOptions
used when creating the server.
Port 0
can be specified meaning "choose an random port".
The server may not be listening until some time after the call to listen has returned.
port
- public NetServer listen(int port, Handler<AsyncResult<NetServer>> listenHandler)
listen()
but providing a handler that will be notified when the server is listening, or fails.port
- the port to listen onlistenHandler
- handler that will be notified when listening or failedpublic Single<NetServer> rxListen(int port)
listen()
but providing a handler that will be notified when the server is listening, or fails.port
- the port to listen onpublic NetServer listen(SocketAddress localAddress)
NetServerOptions
used when
creating the server.
The server may not be listening until some time after the call to listen has returned.
localAddress
- the local address to listen onpublic NetServer listen(SocketAddress localAddress, Handler<AsyncResult<NetServer>> listenHandler)
listen()
but providing a handler that will be notified when the server is listening, or fails.localAddress
- the local address to listen onlistenHandler
- handler that will be notified when listening or failedpublic Single<NetServer> rxListen(SocketAddress localAddress)
listen()
but providing a handler that will be notified when the server is listening, or fails.localAddress
- the local address to listen onpublic void close()
public void close(Handler<AsyncResult<Void>> completionHandler)
close()
but supplying a handler that will be notified when close is complete.completionHandler
- the handlerpublic Completable rxClose()
close()
but supplying a handler that will be notified when close is complete.public int actualPort()
Copyright © 2023 Eclipse. All rights reserved.