public abstract class io.netty.channel.nio.AbstractNioChannel extends io.netty.channel.AbstractChannel
{
private static final io.netty.util.internal.logging.InternalLogger logger;
private final java.nio.channels.SelectableChannel ch;
protected final int readInterestOp;
volatile java.nio.channels.SelectionKey selectionKey;
boolean readPending;
private final java.lang.Runnable clearReadPendingRunnable;
private io.netty.channel.ChannelPromise connectPromise;
private io.netty.util.concurrent.Future connectTimeoutFuture;
private java.net.SocketAddress requestedRemoteAddress;
static final boolean $assertionsDisabled;
protected void <init>(io.netty.channel.Channel, java.nio.channels.SelectableChannel, int)
{
io.netty.channel.Channel v;
io.netty.channel.ChannelException v;
java.nio.channels.SelectableChannel v;
int v;
java.io.IOException v;
io.netty.channel.nio.AbstractNioChannel v;
io.netty.channel.nio.AbstractNioChannel$1 v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v := @parameter: io.netty.channel.Channel;
v := @parameter: java.nio.channels.SelectableChannel;
v := @parameter: int;
specialinvoke v.<io.netty.channel.AbstractChannel: void <init>(io.netty.channel.Channel)>(v);
v = new io.netty.channel.nio.AbstractNioChannel$1;
specialinvoke v.<io.netty.channel.nio.AbstractNioChannel$1: void <init>(io.netty.channel.nio.AbstractNioChannel)>(v);
v.<io.netty.channel.nio.AbstractNioChannel: java.lang.Runnable clearReadPendingRunnable> = v;
v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectableChannel ch> = v;
v.<io.netty.channel.nio.AbstractNioChannel: int readInterestOp> = v;
label:
virtualinvoke v.<java.nio.channels.SelectableChannel: java.nio.channels.SelectableChannel configureBlocking(boolean)>(0);
label:
goto label;
label:
v := @caughtexception;
v = new io.netty.channel.ChannelException;
specialinvoke v.<io.netty.channel.ChannelException: void <init>(java.lang.String,java.lang.Throwable)>("Failed to enter non-blocking mode.", v);
throw v;
label:
return;
catch java.io.IOException from label to label with label;
}
public boolean isOpen()
{
io.netty.channel.nio.AbstractNioChannel v;
java.nio.channels.SelectableChannel v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectableChannel ch>;
v = virtualinvoke v.<java.nio.channels.SelectableChannel: boolean isOpen()>();
return v;
}
public io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()
{
io.netty.channel.nio.AbstractNioChannel v;
io.netty.channel.Channel$Unsafe v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = specialinvoke v.<io.netty.channel.AbstractChannel: io.netty.channel.Channel$Unsafe unsafe()>();
return v;
}
protected java.nio.channels.SelectableChannel javaChannel()
{
io.netty.channel.nio.AbstractNioChannel v;
java.nio.channels.SelectableChannel v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectableChannel ch>;
return v;
}
public io.netty.channel.nio.NioEventLoop eventLoop()
{
io.netty.channel.nio.AbstractNioChannel v;
io.netty.channel.EventLoop v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = specialinvoke v.<io.netty.channel.AbstractChannel: io.netty.channel.EventLoop eventLoop()>();
return v;
}
protected java.nio.channels.SelectionKey selectionKey()
{
java.nio.channels.SelectionKey v, v;
io.netty.channel.nio.AbstractNioChannel v;
java.lang.AssertionError v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = <io.netty.channel.nio.AbstractNioChannel: boolean $assertionsDisabled>;
if v != 0 goto label;
v = v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectionKey selectionKey>;
if v != null goto label;
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
v = v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectionKey selectionKey>;
return v;
}
protected boolean isReadPending()
{
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = v.<io.netty.channel.nio.AbstractNioChannel: boolean readPending>;
return v;
}
protected void setReadPending(boolean)
{
io.netty.channel.nio.AbstractNioChannel$2 v;
io.netty.channel.nio.NioEventLoop v;
io.netty.channel.nio.AbstractNioChannel v;
boolean v, v, v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v := @parameter: boolean;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: boolean isRegistered()>();
if v == 0 goto label;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.NioEventLoop eventLoop()>();
v = interfaceinvoke v.<io.netty.channel.EventLoop: boolean inEventLoop()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.AbstractNioChannel: void setReadPending0(boolean)>(v);
goto label;
label:
v = new io.netty.channel.nio.AbstractNioChannel$2;
specialinvoke v.<io.netty.channel.nio.AbstractNioChannel$2: void <init>(io.netty.channel.nio.AbstractNioChannel,boolean)>(v, v);
interfaceinvoke v.<io.netty.channel.EventLoop: void execute(java.lang.Runnable)>(v);
goto label;
label:
v.<io.netty.channel.nio.AbstractNioChannel: boolean readPending> = v;
label:
return;
}
protected final void clearReadPending()
{
io.netty.channel.nio.NioEventLoop v;
io.netty.channel.nio.AbstractNioChannel v;
java.lang.Runnable v;
boolean v, v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: boolean isRegistered()>();
if v == 0 goto label;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.NioEventLoop eventLoop()>();
v = interfaceinvoke v.<io.netty.channel.EventLoop: boolean inEventLoop()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.AbstractNioChannel: void clearReadPending0()>();
goto label;
label:
v = v.<io.netty.channel.nio.AbstractNioChannel: java.lang.Runnable clearReadPendingRunnable>;
interfaceinvoke v.<io.netty.channel.EventLoop: void execute(java.lang.Runnable)>(v);
goto label;
label:
v.<io.netty.channel.nio.AbstractNioChannel: boolean readPending> = 0;
label:
return;
}
private void setReadPending0(boolean)
{
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
io.netty.channel.nio.AbstractNioChannel$NioUnsafe v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v := @parameter: boolean;
v.<io.netty.channel.nio.AbstractNioChannel: boolean readPending> = v;
if v != 0 goto label;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe: void removeReadOp()>();
label:
return;
}
private void clearReadPending0()
{
io.netty.channel.nio.AbstractNioChannel v;
io.netty.channel.nio.AbstractNioChannel$NioUnsafe v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v.<io.netty.channel.nio.AbstractNioChannel: boolean readPending> = 0;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe: void removeReadOp()>();
return;
}
protected boolean isCompatible(io.netty.channel.EventLoop)
{
io.netty.channel.nio.AbstractNioChannel v;
io.netty.channel.EventLoop v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v := @parameter: io.netty.channel.EventLoop;
v = v instanceof io.netty.channel.nio.NioEventLoop;
return v;
}
protected void doRegister() throws java.lang.Exception
{
java.nio.channels.CancelledKeyException v;
java.nio.channels.SelectionKey v;
java.nio.channels.Selector v;
java.nio.channels.SelectableChannel v;
io.netty.channel.nio.NioEventLoop v, v;
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = 0;
label:
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectableChannel javaChannel()>();
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.NioEventLoop eventLoop()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector unwrappedSelector()>();
v = virtualinvoke v.<java.nio.channels.SelectableChannel: java.nio.channels.SelectionKey register(java.nio.channels.Selector,int,java.lang.Object)>(v, 0, v);
v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectionKey selectionKey> = v;
label:
return;
label:
v := @caughtexception;
if v != 0 goto label;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.NioEventLoop eventLoop()>();
virtualinvoke v.<io.netty.channel.nio.NioEventLoop: int selectNow()>();
v = 1;
goto label;
label:
throw v;
catch java.nio.channels.CancelledKeyException from label to label with label;
}
protected void doDeregister() throws java.lang.Exception
{
io.netty.channel.nio.NioEventLoop v;
io.netty.channel.nio.AbstractNioChannel v;
java.nio.channels.SelectionKey v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.NioEventLoop eventLoop()>();
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectionKey selectionKey()>();
virtualinvoke v.<io.netty.channel.nio.NioEventLoop: void cancel(java.nio.channels.SelectionKey)>(v);
return;
}
protected void doBeginRead() throws java.lang.Exception
{
java.nio.channels.SelectionKey v;
int v, v, v, v, v;
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectionKey selectionKey>;
v = virtualinvoke v.<java.nio.channels.SelectionKey: boolean isValid()>();
if v != 0 goto label;
return;
label:
v.<io.netty.channel.nio.AbstractNioChannel: boolean readPending> = 1;
v = virtualinvoke v.<java.nio.channels.SelectionKey: int interestOps()>();
v = v.<io.netty.channel.nio.AbstractNioChannel: int readInterestOp>;
v = v & v;
if v != 0 goto label;
v = v.<io.netty.channel.nio.AbstractNioChannel: int readInterestOp>;
v = v | v;
virtualinvoke v.<java.nio.channels.SelectionKey: java.nio.channels.SelectionKey interestOps(int)>(v);
label:
return;
}
protected abstract boolean doConnect(java.net.SocketAddress, java.net.SocketAddress) throws java.lang.Exception;
protected abstract void doFinishConnect() throws java.lang.Exception;
protected final io.netty.buffer.ByteBuf newDirectBuffer(io.netty.buffer.ByteBuf)
{
io.netty.buffer.ByteBufAllocator v;
io.netty.buffer.ByteBuf v, v, v, v;
int v, v, v;
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v := @parameter: io.netty.buffer.ByteBuf;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readableBytes()>();
if v != 0 goto label;
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
v = <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf EMPTY_BUFFER>;
return v;
label:
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.buffer.ByteBufAllocator alloc()>();
v = interfaceinvoke v.<io.netty.buffer.ByteBufAllocator: boolean isDirectBufferPooled()>();
if v == 0 goto label;
v = interfaceinvoke v.<io.netty.buffer.ByteBufAllocator: io.netty.buffer.ByteBuf directBuffer(int)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readerIndex()>();
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf,int,int)>(v, v, v);
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
return v;
label:
v = staticinvoke <io.netty.buffer.ByteBufUtil: io.netty.buffer.ByteBuf threadLocalDirectBuffer()>();
if v == null goto label;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readerIndex()>();
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf,int,int)>(v, v, v);
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
return v;
label:
return v;
}
protected final io.netty.buffer.ByteBuf newDirectBuffer(io.netty.util.ReferenceCounted, io.netty.buffer.ByteBuf)
{
io.netty.buffer.ByteBufAllocator v;
io.netty.util.ReferenceCounted v;
io.netty.buffer.ByteBuf v, v, v, v;
int v, v, v;
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v := @parameter: io.netty.util.ReferenceCounted;
v := @parameter: io.netty.buffer.ByteBuf;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readableBytes()>();
if v != 0 goto label;
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
v = <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf EMPTY_BUFFER>;
return v;
label:
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.buffer.ByteBufAllocator alloc()>();
v = interfaceinvoke v.<io.netty.buffer.ByteBufAllocator: boolean isDirectBufferPooled()>();
if v == 0 goto label;
v = interfaceinvoke v.<io.netty.buffer.ByteBufAllocator: io.netty.buffer.ByteBuf directBuffer(int)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readerIndex()>();
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf,int,int)>(v, v, v);
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
return v;
label:
v = staticinvoke <io.netty.buffer.ByteBufUtil: io.netty.buffer.ByteBuf threadLocalDirectBuffer()>();
if v == null goto label;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readerIndex()>();
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf,int,int)>(v, v, v);
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
return v;
label:
if v == v goto label;
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf retain()>();
staticinvoke <io.netty.util.ReferenceCountUtil: void safeRelease(java.lang.Object)>(v);
label:
return v;
}
protected void doClose() throws java.lang.Exception
{
io.netty.channel.ChannelPromise v;
java.nio.channels.ClosedChannelException v;
io.netty.channel.nio.AbstractNioChannel v;
io.netty.util.concurrent.Future v;
v := @this: io.netty.channel.nio.AbstractNioChannel;
v = v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.ChannelPromise connectPromise>;
if v == null goto label;
v = new java.nio.channels.ClosedChannelException;
specialinvoke v.<java.nio.channels.ClosedChannelException: void <init>()>();
interfaceinvoke v.<io.netty.channel.ChannelPromise: boolean tryFailure(java.lang.Throwable)>(v);
v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.ChannelPromise connectPromise> = null;
label:
v = v.<io.netty.channel.nio.AbstractNioChannel: io.netty.util.concurrent.Future connectTimeoutFuture>;
if v == null goto label;
interfaceinvoke v.<io.netty.util.concurrent.Future: boolean cancel(boolean)>(0);
v.<io.netty.channel.nio.AbstractNioChannel: io.netty.util.concurrent.Future connectTimeoutFuture> = null;
label:
return;
}
static void <clinit>()
{
io.netty.util.internal.logging.InternalLogger v;
java.lang.Class v;
boolean v, v;
v = class "Lio/netty/channel/nio/AbstractNioChannel;";
v = virtualinvoke v.<java.lang.Class: boolean desiredAssertionStatus()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
<io.netty.channel.nio.AbstractNioChannel: boolean $assertionsDisabled> = v;
v = staticinvoke <io.netty.util.internal.logging.InternalLoggerFactory: io.netty.util.internal.logging.InternalLogger getInstance(java.lang.Class)>(class "Lio/netty/channel/nio/AbstractNioChannel;");
<io.netty.channel.nio.AbstractNioChannel: io.netty.util.internal.logging.InternalLogger logger> = v;
return;
}
}