public abstract class AbstractEpollStreamChannel
extends io.netty.channel.AbstractChannel
implements io.netty.channel.socket.DuplexChannel
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractEpollStreamChannel.SpliceInTask |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
active |
protected int |
flags |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEpollStreamChannel(io.netty.channel.Channel parent,
int fd)
Deprecated.
|
protected |
AbstractEpollStreamChannel(io.netty.channel.Channel parent,
Socket fd) |
protected |
AbstractEpollStreamChannel(FileDescriptor fd)
Deprecated.
|
protected |
AbstractEpollStreamChannel(int fd)
Deprecated.
|
protected |
AbstractEpollStreamChannel(Socket fd)
Deprecated.
|
protected |
AbstractEpollStreamChannel(Socket fd,
boolean active) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkResolvable(InetSocketAddress addr) |
abstract EpollChannelConfig |
config() |
protected void |
doBeginRead() |
protected void |
doClose() |
protected boolean |
doConnect(SocketAddress remoteAddress,
SocketAddress localAddress)
Connect to the remote peer
|
protected void |
doDeregister() |
protected void |
doDisconnect() |
protected int |
doReadBytes(io.netty.buffer.ByteBuf byteBuf)
Read bytes into the given
ByteBuf and return the amount. |
protected void |
doRegister() |
protected void |
doWrite(io.netty.channel.ChannelOutboundBuffer in) |
protected int |
doWriteBytes(io.netty.buffer.ByteBuf buf,
int writeSpinCount) |
protected boolean |
doWriteSingle(io.netty.channel.ChannelOutboundBuffer in,
int writeSpinCount) |
Socket |
fd()
Returns the
FileDescriptor that is used by this Channel. |
protected Object |
filterOutboundMessage(Object msg) |
boolean |
isActive() |
protected boolean |
isCompatible(io.netty.channel.EventLoop loop) |
boolean |
isInputShutdown() |
boolean |
isOpen() |
boolean |
isOutputShutdown() |
io.netty.channel.ChannelMetadata |
metadata() |
protected io.netty.buffer.ByteBuf |
newDirectBuffer(io.netty.buffer.ByteBuf buf)
Returns an off-heap copy of the specified
ByteBuf, and releases the original one. |
protected io.netty.buffer.ByteBuf |
newDirectBuffer(Object holder,
io.netty.buffer.ByteBuf buf)
Returns an off-heap copy of the specified
ByteBuf, and releases the specified holder. |
protected io.netty.channel.epoll.AbstractEpollChannel.AbstractEpollUnsafe |
newUnsafe() |
io.netty.channel.ChannelFuture |
shutdownOutput() |
io.netty.channel.ChannelFuture |
shutdownOutput(io.netty.channel.ChannelPromise promise) |
protected void |
shutdownOutput0(io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
spliceTo(AbstractEpollStreamChannel ch,
int len)
Splice from this
AbstractEpollStreamChannel to another AbstractEpollStreamChannel. |
io.netty.channel.ChannelFuture |
spliceTo(AbstractEpollStreamChannel ch,
int len,
io.netty.channel.ChannelPromise promise)
Splice from this
AbstractEpollStreamChannel to another AbstractEpollStreamChannel. |
io.netty.channel.ChannelFuture |
spliceTo(FileDescriptor ch,
int offset,
int len)
Splice from this
AbstractEpollStreamChannel to another FileDescriptor. |
io.netty.channel.ChannelFuture |
spliceTo(FileDescriptor ch,
int offset,
int len,
io.netty.channel.ChannelPromise promise)
Splice from this
AbstractEpollStreamChannel to another FileDescriptor. |
alloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, equals, eventLoop, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushclone, finalize, getClass, notify, notifyAll, wait, wait, waitalloc, bind, bind, close, close, closeFuture, config, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, isActive, isOpen, isRegistered, isWritable, localAddress, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushcompareTo@Deprecated protected AbstractEpollStreamChannel(io.netty.channel.Channel parent, int fd)
AbstractEpollStreamChannel(Channel, Socket).@Deprecated protected AbstractEpollStreamChannel(int fd)
AbstractEpollStreamChannel(Socket, boolean).@Deprecated protected AbstractEpollStreamChannel(FileDescriptor fd)
AbstractEpollStreamChannel(Socket, boolean).@Deprecated protected AbstractEpollStreamChannel(Socket fd)
AbstractEpollStreamChannel(Socket, boolean).protected AbstractEpollStreamChannel(io.netty.channel.Channel parent,
Socket fd)
protected AbstractEpollStreamChannel(Socket fd, boolean active)
protected io.netty.channel.epoll.AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()
public final io.netty.channel.ChannelFuture spliceTo(AbstractEpollStreamChannel ch, int len)
AbstractEpollStreamChannel to another AbstractEpollStreamChannel.
The len is the number of bytes to splice. If using Integer.MAX_VALUE it will
splice until the ChannelFuture was canceled or it was failed.
Please note:
EventLoop, otherwise an
IllegalArgumentException is thrown. EpollChannelConfig.getEpollMode() must be EpollMode.LEVEL_TRIGGERED for this and the
target AbstractEpollStreamChannelpublic final io.netty.channel.ChannelFuture spliceTo(AbstractEpollStreamChannel ch, int len, io.netty.channel.ChannelPromise promise)
AbstractEpollStreamChannel to another AbstractEpollStreamChannel.
The len is the number of bytes to splice. If using Integer.MAX_VALUE it will
splice until the ChannelFuture was canceled or it was failed.
Please note:
EventLoop, otherwise an
IllegalArgumentException is thrown. EpollChannelConfig.getEpollMode() must be EpollMode.LEVEL_TRIGGERED for this and the
target AbstractEpollStreamChannelpublic final io.netty.channel.ChannelFuture spliceTo(FileDescriptor ch, int offset, int len)
AbstractEpollStreamChannel to another FileDescriptor.
The offset is the offset for the FileDescriptor and len is the
number of bytes to splice. If using Integer.MAX_VALUE it will splice until the
ChannelFuture was canceled or it was failed.
Please note:
EpollChannelConfig.getEpollMode() must be EpollMode.LEVEL_TRIGGERED for this
AbstractEpollStreamChannelFileDescriptor will not be closed after the ChannelFuture is notifiedIllegalStateException will be thrown.public final io.netty.channel.ChannelFuture spliceTo(FileDescriptor ch, int offset, int len, io.netty.channel.ChannelPromise promise)
AbstractEpollStreamChannel to another FileDescriptor.
The offset is the offset for the FileDescriptor and len is the
number of bytes to splice. If using Integer.MAX_VALUE it will splice until the
ChannelFuture was canceled or it was failed.
Please note:
EpollChannelConfig.getEpollMode() must be EpollMode.LEVEL_TRIGGERED for this
AbstractEpollStreamChannelFileDescriptor will not be closed after the ChannelPromise is notifiedIllegalStateException will be thrown.protected void doWrite(io.netty.channel.ChannelOutboundBuffer in)
throws Exception
doWrite in class io.netty.channel.AbstractChannelExceptionprotected boolean doWriteSingle(io.netty.channel.ChannelOutboundBuffer in,
int writeSpinCount)
throws Exception
Exceptionprotected Object filterOutboundMessage(Object msg)
filterOutboundMessage in class io.netty.channel.AbstractChannelprotected void shutdownOutput0(io.netty.channel.ChannelPromise promise)
public boolean isInputShutdown()
isInputShutdown in interface io.netty.channel.socket.DuplexChannelpublic boolean isOutputShutdown()
isOutputShutdown in interface io.netty.channel.socket.DuplexChannelpublic io.netty.channel.ChannelFuture shutdownOutput()
shutdownOutput in interface io.netty.channel.socket.DuplexChannelpublic io.netty.channel.ChannelFuture shutdownOutput(io.netty.channel.ChannelPromise promise)
shutdownOutput in interface io.netty.channel.socket.DuplexChannelprotected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception
Exceptionpublic final Socket fd()
UnixChannelFileDescriptor that is used by this Channel.fd in interface UnixChannelpublic abstract EpollChannelConfig config()
config in interface io.netty.channel.Channelpublic boolean isActive()
isActive in interface io.netty.channel.Channelpublic io.netty.channel.ChannelMetadata metadata()
metadata in interface io.netty.channel.Channelprotected void doDisconnect()
throws Exception
doDisconnect in class io.netty.channel.AbstractChannelExceptionprotected boolean isCompatible(io.netty.channel.EventLoop loop)
isCompatible in class io.netty.channel.AbstractChannelpublic boolean isOpen()
isOpen in interface io.netty.channel.Channelprotected void doDeregister()
throws Exception
doDeregister in class io.netty.channel.AbstractChannelExceptionprotected void doBeginRead()
throws Exception
doBeginRead in class io.netty.channel.AbstractChannelExceptionprotected void doRegister()
throws Exception
doRegister in class io.netty.channel.AbstractChannelExceptionprotected final io.netty.buffer.ByteBuf newDirectBuffer(io.netty.buffer.ByteBuf buf)
ByteBuf, and releases the original one.protected final io.netty.buffer.ByteBuf newDirectBuffer(Object holder, io.netty.buffer.ByteBuf buf)
ByteBuf, and releases the specified holder.
The caller must ensure that the holder releases the original ByteBuf when the holder is released by
this method.protected static void checkResolvable(InetSocketAddress addr)
protected final int doReadBytes(io.netty.buffer.ByteBuf byteBuf)
throws Exception
ByteBuf and return the amount.ExceptionCopyright © 2008–2016 The Netty Project. All rights reserved.