public abstract class TCPServerBase extends Object implements Closeable, MetricsProvider
| Modifier and Type | Field and Description |
|---|---|
protected Context |
creatingContext |
protected NetServerOptions |
options |
protected SSLHelper |
sslHelper |
protected VertxInternal |
vertx |
| Constructor and Description |
|---|
TCPServerBase(VertxInternal vertx,
NetServerOptions options) |
| Modifier and Type | Method and Description |
|---|---|
int |
actualPort() |
abstract Future<Void> |
close() |
void |
close(Promise<Void> completion)
Close this resource, the
completion promise must be notified when the operation has completed. |
void |
closeAll(Handler<AsyncResult<Void>> handler)
Internal method that closes all servers when Vert.x is closing
|
protected TCPMetrics<?> |
createMetrics(SocketAddress localAddress) |
protected void |
finalize() |
TCPMetrics<?> |
getMetrics()
Returns the metrics implementation.
|
boolean |
isListening() |
boolean |
isMetricsEnabled()
Whether the metrics are enabled for this measured object
|
io.netty.util.concurrent.Future<io.netty.channel.Channel> |
listen(SocketAddress localAddress,
ContextInternal context,
Handler<io.netty.channel.Channel> worker) |
protected final Context creatingContext
protected final VertxInternal vertx
protected final NetServerOptions options
protected final SSLHelper sslHelper
public TCPServerBase(VertxInternal vertx, NetServerOptions options)
public int actualPort()
public io.netty.util.concurrent.Future<io.netty.channel.Channel> listen(SocketAddress localAddress, ContextInternal context, Handler<io.netty.channel.Channel> worker)
public boolean isListening()
protected TCPMetrics<?> createMetrics(SocketAddress localAddress)
public boolean isMetricsEnabled()
MeasuredisMetricsEnabled in interface Measuredtrue if metrics are enabledpublic TCPMetrics<?> getMetrics()
MetricsProvidergetMetrics in interface MetricsProviderpublic void close(Promise<Void> completion)
Closeablecompletion promise must be notified when the operation has completed.public void closeAll(Handler<AsyncResult<Void>> handler)
Copyright © 2021. All rights reserved.