public class io.vertx.core.net.impl.NetServerImpl extends io.vertx.core.net.impl.TCPServerBase implements io.vertx.core.Closeable, io.vertx.core.spi.metrics.MetricsProvider, io.vertx.core.net.NetServer
{
private static final io.vertx.core.impl.logging.Logger log;
private final io.vertx.core.net.impl.NetServerImpl$NetSocketStream connectStream;
private long demand;
private io.vertx.core.Handler handler;
private io.vertx.core.Handler endHandler;
private io.vertx.core.Handler exceptionHandler;
public void <init>(io.vertx.core.impl.VertxInternal, io.vertx.core.net.NetServerOptions)
{
io.vertx.core.net.NetServerOptions v;
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.impl.VertxInternal v;
io.vertx.core.net.impl.NetServerImpl$NetSocketStream v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.impl.VertxInternal;
v := @parameter: io.vertx.core.net.NetServerOptions;
specialinvoke v.<io.vertx.core.net.impl.TCPServerBase: void <init>(io.vertx.core.impl.VertxInternal,io.vertx.core.net.NetServerOptions)>(v, v);
v = new io.vertx.core.net.impl.NetServerImpl$NetSocketStream;
specialinvoke v.<io.vertx.core.net.impl.NetServerImpl$NetSocketStream: void <init>(io.vertx.core.net.impl.NetServerImpl)>(v);
v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.impl.NetServerImpl$NetSocketStream connectStream> = v;
v.<io.vertx.core.net.impl.NetServerImpl: long demand> = 9223372036854775807L;
return;
}
private synchronized void pauseAccepting()
{
io.vertx.core.net.impl.NetServerImpl v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v.<io.vertx.core.net.impl.NetServerImpl: long demand> = 0L;
return;
}
private synchronized void resumeAccepting()
{
io.vertx.core.net.impl.NetServerImpl v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v.<io.vertx.core.net.impl.NetServerImpl: long demand> = 9223372036854775807L;
return;
}
private synchronized void fetchAccepting(long)
{
io.vertx.core.net.impl.NetServerImpl v;
byte v, v;
long v, v, v, v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: long;
v = v cmp 0L;
if v <= 0 goto label;
v = v.<io.vertx.core.net.impl.NetServerImpl: long demand>;
v = v + v;
v.<io.vertx.core.net.impl.NetServerImpl: long demand> = v;
v = v.<io.vertx.core.net.impl.NetServerImpl: long demand>;
v = v cmp 0L;
if v >= 0 goto label;
v.<io.vertx.core.net.impl.NetServerImpl: long demand> = 9223372036854775807L;
label:
return;
}
protected synchronized boolean accept()
{
io.vertx.core.net.impl.NetServerImpl v;
long v, v, v, v;
byte v, v;
boolean v, v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v = v.<io.vertx.core.net.impl.NetServerImpl: long demand>;
v = v cmp 0L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v;
if v == 0 goto label;
v = v.<io.vertx.core.net.impl.NetServerImpl: long demand>;
v = v cmp 9223372036854775807L;
if v == 0 goto label;
v = v.<io.vertx.core.net.impl.NetServerImpl: long demand>;
v = v - 1L;
v.<io.vertx.core.net.impl.NetServerImpl: long demand> = v;
label:
return v;
}
public synchronized io.vertx.core.Handler connectHandler()
{
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.Handler v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler handler>;
return v;
}
public synchronized io.vertx.core.net.NetServer connectHandler(io.vertx.core.Handler)
{
java.lang.IllegalStateException v;
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.Handler v;
boolean v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.Handler;
v = virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: boolean isListening()>();
if v == 0 goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Cannot set connectHandler when server is listening");
throw v;
label:
v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler handler> = v;
return v;
}
public synchronized io.vertx.core.net.NetServer exceptionHandler(io.vertx.core.Handler)
{
java.lang.IllegalStateException v;
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.Handler v;
boolean v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.Handler;
v = virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: boolean isListening()>();
if v == 0 goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Cannot set exceptionHandler when server is listening");
throw v;
label:
v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler exceptionHandler> = v;
return v;
}
protected io.vertx.core.spi.metrics.TCPMetrics createMetrics(io.vertx.core.net.SocketAddress)
{
io.vertx.core.net.NetServerOptions v;
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.impl.VertxInternal v;
io.vertx.core.spi.metrics.TCPMetrics v;
io.vertx.core.spi.metrics.VertxMetrics v;
io.vertx.core.net.SocketAddress v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.net.SocketAddress;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.impl.VertxInternal vertx>;
v = interfaceinvoke v.<io.vertx.core.impl.VertxInternal: io.vertx.core.spi.metrics.VertxMetrics metricsSPI()>();
if v == null goto label;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = interfaceinvoke v.<io.vertx.core.spi.metrics.VertxMetrics: io.vertx.core.spi.metrics.TCPMetrics createNetServerMetrics(io.vertx.core.net.NetServerOptions,io.vertx.core.net.SocketAddress)>(v, v);
return v;
label:
return null;
}
public io.vertx.core.Future close()
{
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.impl.VertxInternal v;
io.vertx.core.impl.future.PromiseInternal v;
io.vertx.core.impl.ContextInternal v;
io.vertx.core.Future v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.impl.VertxInternal vertx>;
v = interfaceinvoke v.<io.vertx.core.impl.VertxInternal: io.vertx.core.impl.ContextInternal getOrCreateContext()>();
v = interfaceinvoke v.<io.vertx.core.impl.ContextInternal: io.vertx.core.impl.future.PromiseInternal promise()>();
virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: void close(io.vertx.core.Promise)>(v);
v = interfaceinvoke v.<io.vertx.core.Promise: io.vertx.core.Future future()>();
return v;
}
protected java.util.function.BiConsumer childHandler(io.vertx.core.impl.ContextInternal, io.vertx.core.net.SocketAddress)
{
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.impl.ContextInternal v;
io.vertx.core.Handler v, v;
io.vertx.core.net.SocketAddress v;
io.vertx.core.net.impl.NetServerImpl$NetServerWorker v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.impl.ContextInternal;
v := @parameter: io.vertx.core.net.SocketAddress;
v = new io.vertx.core.net.impl.NetServerImpl$NetServerWorker;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler handler>;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler exceptionHandler>;
specialinvoke v.<io.vertx.core.net.impl.NetServerImpl$NetServerWorker: void <init>(io.vertx.core.net.impl.NetServerImpl,io.vertx.core.impl.ContextInternal,io.vertx.core.Handler,io.vertx.core.Handler)>(v, v, v, v);
return v;
}
public synchronized io.vertx.core.Future listen(io.vertx.core.net.SocketAddress)
{
java.lang.IllegalStateException v;
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.Handler v;
io.vertx.core.Future v, v;
java.lang.NullPointerException v;
io.vertx.core.net.SocketAddress v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.net.SocketAddress;
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("No null bind local address");
throw v;
label:
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler handler>;
if v != null goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Set connect handler first");
throw v;
label:
v = virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Future bind(io.vertx.core.net.SocketAddress)>(v);
v = interfaceinvoke v.<io.vertx.core.Future: io.vertx.core.Future map(java.lang.Object)>(v);
return v;
}
public io.vertx.core.Future listen()
{
io.vertx.core.net.NetServerOptions v, v;
io.vertx.core.net.impl.NetServerImpl v;
int v;
java.lang.String v;
io.vertx.core.Future v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: int getPort()>();
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: java.lang.String getHost()>();
v = virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Future listen(int,java.lang.String)>(v, v);
return v;
}
public io.vertx.core.streams.ReadStream connectStream()
{
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.net.impl.NetServerImpl$NetSocketStream v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.impl.NetServerImpl$NetSocketStream connectStream>;
return v;
}
public void close(io.vertx.core.Handler)
{
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.impl.VertxInternal v;
io.vertx.core.impl.future.PromiseInternal v;
io.vertx.core.impl.ContextInternal v;
io.vertx.core.Handler v;
io.vertx.core.Future v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.Handler;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.impl.VertxInternal vertx>;
v = interfaceinvoke v.<io.vertx.core.impl.VertxInternal: io.vertx.core.impl.ContextInternal getOrCreateContext()>();
v = interfaceinvoke v.<io.vertx.core.impl.ContextInternal: io.vertx.core.impl.future.PromiseInternal promise()>();
virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: void close(io.vertx.core.Promise)>(v);
v = interfaceinvoke v.<io.vertx.core.Promise: io.vertx.core.Future future()>();
interfaceinvoke v.<io.vertx.core.Future: io.vertx.core.Future onComplete(io.vertx.core.Handler)>(v);
return;
}
public synchronized void close(io.vertx.core.Promise)
{
io.vertx.core.net.impl.NetServerImpl v;
io.vertx.core.Promise v;
io.vertx.core.Handler v, v, v;
io.vertx.core.Future v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.vertx.core.Promise;
specialinvoke v.<io.vertx.core.net.impl.TCPServerBase: void close(io.vertx.core.Promise)>(v);
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler endHandler>;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler endHandler>;
if v == null goto label;
v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.Handler endHandler> = null;
v = interfaceinvoke v.<io.vertx.core.Promise: io.vertx.core.Future future()>();
v = staticinvoke <io.vertx.core.net.impl.NetServerImpl$lambda_close_0__1344: io.vertx.core.Handler bootstrap$(io.vertx.core.Handler)>(v);
interfaceinvoke v.<io.vertx.core.Future: io.vertx.core.Future onComplete(io.vertx.core.Handler)>(v);
label:
return;
}
public boolean isClosed()
{
io.vertx.core.net.impl.NetServerImpl v;
boolean v, v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v = virtualinvoke v.<io.vertx.core.net.impl.NetServerImpl: boolean isListening()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
protected void initChannel(io.netty.channel.ChannelPipeline, boolean)
{
io.vertx.core.net.impl.NetServerImpl v;
io.netty.handler.logging.LoggingHandler v;
io.netty.handler.stream.ChunkedWriteHandler v;
io.vertx.core.spi.transport.Transport v;
io.netty.handler.logging.ByteBufFormat v;
int v, v, v;
boolean v, v, v;
io.vertx.core.impl.VertxInternal v;
io.netty.channel.ChannelPipeline v;
java.util.concurrent.TimeUnit v;
io.netty.handler.timeout.IdleStateHandler v;
io.vertx.core.net.NetServerOptions v, v, v, v, v, v;
v := @this: io.vertx.core.net.impl.NetServerImpl;
v := @parameter: io.netty.channel.ChannelPipeline;
v := @parameter: boolean;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: boolean getLogActivity()>();
if v == 0 goto label;
v = new io.netty.handler.logging.LoggingHandler;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: io.netty.handler.logging.ByteBufFormat getActivityLogDataFormat()>();
specialinvoke v.<io.netty.handler.logging.LoggingHandler: void <init>(io.netty.handler.logging.ByteBufFormat)>(v);
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelPipeline addLast(java.lang.String,io.netty.channel.ChannelHandler)>("logging", v);
label:
if v != 0 goto label;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.impl.VertxInternal vertx>;
v = interfaceinvoke v.<io.vertx.core.impl.VertxInternal: io.vertx.core.spi.transport.Transport transport()>();
v = interfaceinvoke v.<io.vertx.core.spi.transport.Transport: boolean supportFileRegion()>();
if v != 0 goto label;
label:
v = new io.netty.handler.stream.ChunkedWriteHandler;
specialinvoke v.<io.netty.handler.stream.ChunkedWriteHandler: void <init>()>();
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelPipeline addLast(java.lang.String,io.netty.channel.ChannelHandler)>("chunkedWriter", v);
label:
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: int getIdleTimeout()>();
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: int getReadIdleTimeout()>();
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: int getWriteIdleTimeout()>();
if v > 0 goto label;
if v > 0 goto label;
if v <= 0 goto label;
label:
v = new io.netty.handler.timeout.IdleStateHandler;
v = v.<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.net.NetServerOptions options>;
v = virtualinvoke v.<io.vertx.core.net.NetServerOptions: java.util.concurrent.TimeUnit getIdleTimeoutUnit()>();
specialinvoke v.<io.netty.handler.timeout.IdleStateHandler: void <init>(long,long,long,java.util.concurrent.TimeUnit)>(v, v, v, v);
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelPipeline addLast(java.lang.String,io.netty.channel.ChannelHandler)>("idle", v);
label:
return;
}
static void <clinit>()
{
io.vertx.core.impl.logging.Logger v;
v = staticinvoke <io.vertx.core.impl.logging.LoggerFactory: io.vertx.core.impl.logging.Logger getLogger(java.lang.Class)>(class "Lio/vertx/core/net/impl/NetServerImpl;");
<io.vertx.core.net.impl.NetServerImpl: io.vertx.core.impl.logging.Logger log> = v;
return;
}
}