public final class io.vertx.core.net.impl.VertxHandler extends io.netty.channel.ChannelDuplexHandler
{
private final java.util.function.Function connectionFactory;
private io.vertx.core.net.impl.ConnectionBase conn;
private io.vertx.core.Handler addHandler;
private io.vertx.core.Handler removeHandler;
public static io.vertx.core.net.impl.VertxHandler create(java.util.function.Function)
{
io.vertx.core.net.impl.VertxHandler v;
java.util.function.Function v;
v := @parameter: java.util.function.Function;
v = new io.vertx.core.net.impl.VertxHandler;
specialinvoke v.<io.vertx.core.net.impl.VertxHandler: void <init>(java.util.function.Function)>(v);
return v;
}
private void <init>(java.util.function.Function)
{
io.vertx.core.net.impl.VertxHandler v;
java.util.function.Function v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: java.util.function.Function;
specialinvoke v.<io.netty.channel.ChannelDuplexHandler: void <init>()>();
v.<io.vertx.core.net.impl.VertxHandler: java.util.function.Function connectionFactory> = v;
return;
}
public static io.netty.buffer.ByteBuf safeBuffer(io.netty.buffer.ByteBuf)
{
java.lang.Throwable v;
io.netty.buffer.ByteBufAllocator v;
io.vertx.core.buffer.impl.VertxByteBufAllocator v;
io.netty.buffer.ByteBuf v, v, v, v;
int v, v, v;
boolean v, v, v;
v := @parameter: io.netty.buffer.ByteBuf;
v = <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf EMPTY_BUFFER>;
if v == v goto label;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBufAllocator alloc()>();
v = v instanceof io.netty.buffer.PooledByteBufAllocator;
if v != 0 goto label;
v = v instanceof io.netty.buffer.CompositeByteBuf;
if v == 0 goto label;
label:
v = virtualinvoke v.<io.netty.buffer.ByteBuf: boolean isReadable()>();
if v == 0 goto label;
v = <io.vertx.core.buffer.impl.VertxByteBufAllocator: io.vertx.core.buffer.impl.VertxByteBufAllocator DEFAULT>;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readableBytes()>();
v = virtualinvoke v.<io.vertx.core.buffer.impl.VertxByteBufAllocator: io.netty.buffer.ByteBuf heapBuffer(int)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readerIndex()>();
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readableBytes()>();
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf,int,int)>(v, v, v);
label:
virtualinvoke v.<io.netty.buffer.ByteBuf: boolean release()>();
return v;
label:
v = <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf EMPTY_BUFFER>;
label:
virtualinvoke v.<io.netty.buffer.ByteBuf: boolean release()>();
return v;
label:
v := @caughtexception;
virtualinvoke v.<io.netty.buffer.ByteBuf: boolean release()>();
throw v;
label:
return v;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
private void setConnection(io.vertx.core.net.impl.ConnectionBase)
{
io.vertx.core.net.impl.VertxHandler v;
io.vertx.core.Handler v, v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.vertx.core.net.impl.ConnectionBase;
v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn> = v;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler addHandler>;
if v == null goto label;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler addHandler>;
interfaceinvoke v.<io.vertx.core.Handler: void handle(java.lang.Object)>(v);
label:
return;
}
public void handlerAdded(io.netty.channel.ChannelHandlerContext)
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
java.lang.Object v;
java.util.function.Function v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = v.<io.vertx.core.net.impl.VertxHandler: java.util.function.Function connectionFactory>;
v = interfaceinvoke v.<java.util.function.Function: java.lang.Object apply(java.lang.Object)>(v);
specialinvoke v.<io.vertx.core.net.impl.VertxHandler: void setConnection(io.vertx.core.net.impl.ConnectionBase)>(v);
return;
}
public void handlerRemoved(io.netty.channel.ChannelHandlerContext) throws java.lang.Exception
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
io.vertx.core.Handler v, v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler removeHandler>;
if v == null goto label;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler removeHandler>;
v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler removeHandler> = null;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
interfaceinvoke v.<io.vertx.core.Handler: void handle(java.lang.Object)>(v);
label:
return;
}
public io.vertx.core.net.impl.VertxHandler addHandler(io.vertx.core.Handler)
{
io.vertx.core.net.impl.VertxHandler v;
io.vertx.core.Handler v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.vertx.core.Handler;
v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler addHandler> = v;
return v;
}
public io.vertx.core.net.impl.VertxHandler removeHandler(io.vertx.core.Handler)
{
io.vertx.core.net.impl.VertxHandler v;
io.vertx.core.Handler v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.vertx.core.Handler;
v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.Handler removeHandler> = v;
return v;
}
public io.vertx.core.net.impl.ConnectionBase getConnection()
{
io.vertx.core.net.impl.VertxHandler v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
return v;
}
public void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext)
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = virtualinvoke v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase getConnection()>();
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void handleInterestedOpsChanged()>();
return;
}
public void exceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)
{
io.vertx.core.net.impl.VertxHandler v;
java.lang.Throwable v;
io.netty.channel.ChannelHandlerContext v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Throwable;
v = virtualinvoke v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase getConnection()>();
if v == null goto label;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void handleException(java.lang.Throwable)>(v);
label:
interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelFuture close()>();
return;
}
public void channelInactive(io.netty.channel.ChannelHandlerContext)
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void handleClosed()>();
return;
}
public void channelReadComplete(io.netty.channel.ChannelHandlerContext)
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void endReadAndFlush()>();
return;
}
public void channelRead(io.netty.channel.ChannelHandlerContext, java.lang.Object)
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
java.lang.Object v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Object;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void read(java.lang.Object)>(v);
return;
}
public void close(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelPromise) throws java.lang.Exception
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
io.netty.channel.ChannelPromise v;
io.vertx.core.net.impl.ConnectionBase v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: io.netty.channel.ChannelPromise;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void close(io.netty.channel.ChannelPromise)>(v);
return;
}
public void userEventTriggered(io.netty.channel.ChannelHandlerContext, java.lang.Object) throws java.lang.Exception
{
io.vertx.core.net.impl.VertxHandler v;
io.netty.channel.ChannelHandlerContext v;
java.lang.Object v;
io.vertx.core.net.impl.ConnectionBase v, v;
boolean v;
v := @this: io.vertx.core.net.impl.VertxHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Object;
v = v instanceof io.netty.handler.timeout.IdleStateEvent;
if v == 0 goto label;
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void handleIdle(io.netty.handler.timeout.IdleStateEvent)>(v);
label:
v = v.<io.vertx.core.net.impl.VertxHandler: io.vertx.core.net.impl.ConnectionBase conn>;
virtualinvoke v.<io.vertx.core.net.impl.ConnectionBase: void handleEvent(java.lang.Object)>(v);
return;
}
}