Top Inners Fields Constructors Methods
io.netty.channel.kqueue

pack-priv abstract Class AbstractKQueueChannel

extends AbstractChannel
implements UnixChannel
Class Inheritance
All Implemented Interfaces
io.netty.channel.unix.UnixChannel, io.netty.channel.Channel, java.lang.Comparable, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap
Known Direct Subclasses
io.netty.channel.kqueue.AbstractKQueueDatagramChannel, io.netty.channel.kqueue.AbstractKQueueServerChannel, io.netty.channel.kqueue.AbstractKQueueStreamChannel
Imports
io.netty.buffer.ByteBuf, .ByteBufAllocator, .ByteBufUtil, .Unpooled, io.netty.channel.AbstractChannel, .Channel, .ChannelConfig, .ChannelException, .ChannelFuture, .ChannelFutureListener, .ChannelMetadata, .ChannelOutboundBuffer, .ChannelPromise, .ConnectTimeoutException, .EventLoop, .RecvByteBufAllocator, io.netty.channel.socket.ChannelInputShutdownEvent, .ChannelInputShutdownReadComplete, .SocketChannelConfig, io.netty.channel.unix.FileDescriptor, .UnixChannel, io.netty.util.ReferenceCountUtil, io.netty.util.concurrent.Future, io.netty.util.internal.UnstableApi, java.io.IOException, java.net.ConnectException, .InetSocketAddress, .SocketAddress, java.nio.ByteBuffer, java.nio.channels.AlreadyConnectedException, .ConnectionPendingException, .NotYetConnectedException, .UnresolvedAddressException, java.util.concurrent.TimeUnit

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract class

Field Summary

Modifier and TypeField and Description
protected volatile boolean
private ChannelPromise
connectPromise

The future of the current connection attempt.

private Future<?>
pack-priv boolean
private volatile SocketAddress
private static final ChannelMetadata
private boolean
pack-priv boolean
private volatile SocketAddress
private SocketAddress
pack-priv final BsdSocket
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractKQueueChannel(Channel parent, BsdSocket fd, boolean active)

pack-priv

Method Summary

Modifier and TypeMethod and Description
protected static void
private void
pack-priv final void
public abstract KQueueChannelConfig
config()

Redeclares io.netty.channel.Channel.config.

Returns the configuration of this channel.
protected final void
doBeginRead()

Implements abstract io.netty.channel.AbstractChannel.doBeginRead.

Schedule a read operation.
protected void
protected void
protected boolean
doConnect(SocketAddress remoteAddress, SocketAddress localAddress)

Connect to the remote peer

protected boolean
doConnect0(SocketAddress remoteAddress, SocketAddress localAddress)

protected void
protected void
doDisconnect()

Implements abstract io.netty.channel.AbstractChannel.doDisconnect.

Disconnect this Channel from its remote peer
protected final int
doReadBytes(ByteBuf byteBuf)

Read bytes into the given ByteBuf and return the amount.

protected void
doRegister()

Overrides io.netty.channel.AbstractChannel.doRegister.

Is called after the Channel is registered with its EventLoop as part of the register process.
protected final int
private void
evSet(short filter, short flags)

private void
evSet0(short filter, short flags)

private void
evSet0(short filter, short flags, int fflags)

public final FileDescriptor
fd()

Implements io.netty.channel.unix.UnixChannel.fd.

Returns the FileDescriptor that is used by this Channel.
public boolean
isActive()

Implements io.netty.channel.Channel.isActive.

Return true if the Channel is active and so connected.
private static boolean
protected boolean
isCompatible(EventLoop loop)

Implements abstract io.netty.channel.AbstractChannel.isCompatible.

Return true if the given EventLoop is compatible with this instance.
public boolean
isOpen()

Implements io.netty.channel.Channel.isOpen.

Returns true if the Channel is open and may get active later
pack-priv static boolean
protected SocketAddress
localAddress0()

Implements abstract io.netty.channel.AbstractChannel.localAddress0.

Returns the SocketAddress which is bound locally.
public ChannelMetadata
metadata()

Implements io.netty.channel.Channel.metadata.

Return the ChannelMetadata of the Channel which describe the nature of the Channel.
protected final ByteBuf
newDirectBuffer(ByteBuf buf)

Returns an off-heap copy of the specified ByteBuf, and releases the original one.

protected final ByteBuf
newDirectBuffer(Object holder, ByteBuf buf)

Returns an off-heap copy of the specified ByteBuf, and releases the specified holder.

private static ByteBuf
newDirectBuffer0(Object holder, ByteBuf buf, ByteBufAllocator alloc, int capacity)

protected abstract AbstractKQueueChannel.AbstractKQueueUnsafe
newUnsafe()

Implements abstract io.netty.channel.AbstractChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel
pack-priv void
readFilter(boolean readFilterEnabled)

protected SocketAddress
remoteAddress0()

Implements abstract io.netty.channel.AbstractChannel.remoteAddress0.

Return the SocketAddress which the Channel is connected to.
pack-priv void
pack-priv final boolean
pack-priv void
pack-priv void
writeFilter(boolean writeFilterEnabled)

Inherited from io.netty.channel.AbstractChannel:
allocbindbindbytesBeforeUnwritablebytesBeforeWritablecloseclosecloseFuturecompareToconnectconnectconnectconnectderegisterderegisterdisconnectdisconnectdoShutdownOutputdoWriteequalseventLoopfilterOutboundMessageflushhashCodeidinvalidateLocalAddressinvalidateRemoteAddressisRegisteredisWritablelocalAddressmaxMessagesPerWritenewChannelPipelinenewFailedFuturenewIdnewProgressivePromisenewPromisenewSucceededFutureparentpipelinereadremoteAddresstoStringunsafevalidateFileRegionvoidPromisewritewritewriteAndFlushwriteAndFlush

Field Detail

activeback to summary
protected volatile boolean active
connectPromiseback to summary
private ChannelPromise connectPromise

The future of the current connection attempt. If not null, subsequent connection attempts will fail.

connectTimeoutFutureback to summary
private Future<?> connectTimeoutFuture
inputClosedSeenErrorOnReadback to summary
pack-priv boolean inputClosedSeenErrorOnRead
localback to summary
private volatile SocketAddress local
METADATAback to summary
private static final ChannelMetadata METADATA
readFilterEnabledback to summary
private boolean readFilterEnabled
readReadyRunnablePendingback to summary
pack-priv boolean readReadyRunnablePending
remoteback to summary
private volatile SocketAddress remote
requestedRemoteAddressback to summary
private SocketAddress requestedRemoteAddress
socketback to summary
pack-priv final BsdSocket socket
writeFilterEnabledback to summary
private boolean writeFilterEnabled

Constructor Detail

AbstractKQueueChannelback to summary
pack-priv AbstractKQueueChannel(Channel parent, BsdSocket fd, boolean active)
AbstractKQueueChannelback to summary
pack-priv AbstractKQueueChannel(Channel parent, BsdSocket fd, SocketAddress remote)

Method Detail

checkResolvableback to summary
protected static void checkResolvable(InetSocketAddress addr)
clearRdHup0back to summary
private void clearRdHup0()
clearReadFilterback to summary
pack-priv final void clearReadFilter()
configback to summary
public abstract KQueueChannelConfig config()

Redeclares io.netty.channel.Channel.config.

Doc from io.netty.channel.Channel.config.

Returns the configuration of this channel.

Annotations
@Override
doBeginReadback to summary
protected final void doBeginRead() throws Exception

Implements abstract io.netty.channel.AbstractChannel.doBeginRead.

Doc from io.netty.channel.AbstractChannel.doBeginRead.

Schedule a read operation.

Annotations
@Override
doBindback to summary
protected void doBind(SocketAddress local) throws Exception

Implements abstract io.netty.channel.AbstractChannel.doBind.

Doc from io.netty.channel.AbstractChannel.doBind.

Bind the Channel to the SocketAddress

Annotations
@Override
doCloseback to summary
protected void doClose() throws Exception

Implements abstract io.netty.channel.AbstractChannel.doClose.

Doc from io.netty.channel.AbstractChannel.doClose.

Close the Channel

Annotations
@Override
doConnectback to summary
protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception

Connect to the remote peer

doConnect0back to summary
protected boolean doConnect0(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception
doDeregisterback to summary
protected void doDeregister() throws Exception

Overrides io.netty.channel.AbstractChannel.doDeregister.

Doc from io.netty.channel.AbstractChannel.doDeregister.

Deregister the Channel from its EventLoop. Sub-classes may override this method

Annotations
@Override
doDisconnectback to summary
protected void doDisconnect() throws Exception

Implements abstract io.netty.channel.AbstractChannel.doDisconnect.

Doc from io.netty.channel.AbstractChannel.doDisconnect.

Disconnect this Channel from its remote peer

Annotations
@Override
doReadBytesback to summary
protected final int doReadBytes(ByteBuf byteBuf) throws Exception

Read bytes into the given ByteBuf and return the amount.

doRegisterback to summary
protected void doRegister() throws Exception

Overrides io.netty.channel.AbstractChannel.doRegister.

Doc from io.netty.channel.AbstractChannel.doRegister.

Is called after the Channel is registered with its EventLoop as part of the register process. Sub-classes may override this method

Annotations
@Override
doWriteBytesback to summary
protected final int doWriteBytes(ChannelOutboundBuffer in, ByteBuf buf) throws Exception
evSetback to summary
private void evSet(short filter, short flags)
evSet0back to summary
private void evSet0(short filter, short flags)
evSet0back to summary
private void evSet0(short filter, short flags, int fflags)
fdback to summary
public final FileDescriptor fd()

Implements io.netty.channel.unix.UnixChannel.fd.

Doc from io.netty.channel.unix.UnixChannel.fd.

Returns the FileDescriptor that is used by this Channel.

Annotations
@Override
isActiveback to summary
public boolean isActive()

Implements io.netty.channel.Channel.isActive.

Doc from io.netty.channel.Channel.isActive.

Return true if the Channel is active and so connected.

Annotations
@Override
isAllowHalfClosureback to summary
private static boolean isAllowHalfClosure(ChannelConfig config)
isCompatibleback to summary
protected boolean isCompatible(EventLoop loop)

Implements abstract io.netty.channel.AbstractChannel.isCompatible.

Doc from io.netty.channel.AbstractChannel.isCompatible.

Return true if the given EventLoop is compatible with this instance.

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements io.netty.channel.Channel.isOpen.

Doc from io.netty.channel.Channel.isOpen.

Returns true if the Channel is open and may get active later

Annotations
@Override
isSoErrorZeroback to summary
pack-priv static boolean isSoErrorZero(BsdSocket fd)
localAddress0back to summary
protected SocketAddress localAddress0()

Implements abstract io.netty.channel.AbstractChannel.localAddress0.

Doc from io.netty.channel.AbstractChannel.localAddress0.

Returns the SocketAddress which is bound locally.

Annotations
@Override
metadataback to summary
public ChannelMetadata metadata()

Implements io.netty.channel.Channel.metadata.

Doc from io.netty.channel.Channel.metadata.

Return the ChannelMetadata of the Channel which describe the nature of the Channel.

Annotations
@Override
newDirectBufferback to summary
protected final ByteBuf newDirectBuffer(ByteBuf buf)

Returns an off-heap copy of the specified ByteBuf, and releases the original one.

newDirectBufferback to summary
protected final ByteBuf newDirectBuffer(Object holder, ByteBuf buf)

Returns an off-heap copy of the specified 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.

newDirectBuffer0back to summary
private static ByteBuf newDirectBuffer0(Object holder, ByteBuf buf, ByteBufAllocator alloc, int capacity)
newUnsafeback to summary
protected abstract AbstractKQueueChannel.AbstractKQueueUnsafe newUnsafe()

Implements abstract io.netty.channel.AbstractChannel.newUnsafe.

Doc from io.netty.channel.AbstractChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel

Annotations
@Override
readFilterback to summary
pack-priv void readFilter(boolean readFilterEnabled) throws IOException
remoteAddress0back to summary
protected SocketAddress remoteAddress0()

Implements abstract io.netty.channel.AbstractChannel.remoteAddress0.

Doc from io.netty.channel.AbstractChannel.remoteAddress0.

Return the SocketAddress which the Channel is connected to.

Annotations
@Override
resetCachedAddressesback to summary
pack-priv void resetCachedAddresses()
shouldBreakReadReadyback to summary
pack-priv final boolean shouldBreakReadReady(ChannelConfig config)
unregisterFiltersback to summary
pack-priv void unregisterFilters() throws Exception
writeFilterback to summary
pack-priv void writeFilter(boolean writeFilterEnabled) throws IOException
io.netty.channel.kqueue back to summary

public abstract Class AbstractKQueueChannel.AbstractKQueueUnsafe

extends AbstractUnsafe
Class Inheritance
Known Direct Subclasses
io.netty.channel.kqueue.AbstractKQueueServerChannel.KQueueServerSocketUnsafe, io.netty.channel.kqueue.AbstractKQueueStreamChannel.KQueueStreamUnsafe, io.netty.channel.kqueue.KQueueDatagramChannel.KQueueDatagramChannelUnsafe, io.netty.channel.kqueue.KQueueDomainDatagramChannel.KQueueDomainDatagramChannelUnsafe
Annotations
@UnstableApi

Field Summary

Modifier and TypeField and Description
private KQueueRecvByteAllocatorHandle
allocHandle

Deprecated as a consequence of KQueueRecvByteAllocatorHandle being deprecated.
pack-priv boolean
pack-priv boolean
private final Runnable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final void
public void
connect(final SocketAddress remoteAddress, final SocketAddress localAddress, final ChannelPromise promise)

Implements io.netty.channel.Channel.Unsafe.connect.

Connect the Channel of the given ChannelFuture with the given remote SocketAddress.
private boolean
pack-priv final void
pack-priv final boolean
private void
private void
protected final void
private void
fulfillConnectPromise(ChannelPromise promise, boolean wasActive)

private void
pack-priv final void
pack-priv final void
readReady(long numberBytesPending)

pack-priv abstract void
readReady(KQueueRecvByteAllocatorHandle allocHandle)

Deprecated as a consequence of KQueueRecvByteAllocatorHandle being deprecated.
pack-priv final void
pack-priv final void
public KQueueRecvByteAllocatorHandle
recvBufAllocHandle()

Overrides io.netty.channel.AbstractChannel.AbstractUnsafe.recvBufAllocHandle.

Implements io.netty.channel.Channel.Unsafe.recvBufAllocHandle.

Deprecated as a consequence of KQueueRecvByteAllocatorHandle being deprecated.
Return the assigned RecvByteBufAllocator.Handle which will be used to allocate ByteBuf's when receiving data.
pack-priv void
shutdownInput(boolean readEOF)

Shutdown the input side of the channel.

pack-priv final void
Inherited from io.netty.channel.AbstractChannel.AbstractUnsafe:
annotateConnectExceptionbeginReadbindclosecloseForciblycloseIfClosedderegisterdisconnectensureOpenflushhandleWriteErrorlocalAddressoutboundBufferprepareToCloseregisterremoteAddresssafeSetFailuresafeSetSuccessshutdownOutputvoidPromisewrite

Field Detail

allocHandleback to summary
private KQueueRecvByteAllocatorHandle allocHandle

Deprecated

as a consequence of KQueueRecvByteAllocatorHandle being deprecated. See corresponding docs for further information.

maybeMoreDataToReadback to summary
pack-priv boolean maybeMoreDataToRead
readPendingback to summary
pack-priv boolean readPending
readReadyRunnableback to summary
private final Runnable readReadyRunnable

Constructor Detail

AbstractKQueueUnsafeback to summary
public AbstractKQueueUnsafe()

Method Detail

clearReadFilter0back to summary
protected final void clearReadFilter0()
connectback to summary
public void connect(final SocketAddress remoteAddress, final SocketAddress localAddress, final ChannelPromise promise)

Implements io.netty.channel.Channel.Unsafe.connect.

Doc from io.netty.channel.Channel.Unsafe.connect.

Connect the Channel of the given ChannelFuture with the given remote SocketAddress. If a specific local SocketAddress should be used it need to be given as argument. Otherwise just pass null to it. The ChannelPromise will get notified once the connect operation was complete.

Annotations
@Override
doFinishConnectback to summary
private boolean doFinishConnect() throws Exception
executeReadReadyRunnableback to summary
pack-priv final void executeReadReadyRunnable(ChannelConfig config)
failConnectPromiseback to summary
pack-priv final boolean failConnectPromise(Throwable cause)
finishConnectback to summary
private void finishConnect()
fireEventAndCloseback to summary
private void fireEventAndClose(Object evt)
flush0back to summary
protected final void flush0()

Overrides io.netty.channel.AbstractChannel.AbstractUnsafe.flush0.

Annotations
@Override
fulfillConnectPromiseback to summary
private void fulfillConnectPromise(ChannelPromise promise, boolean wasActive)
fulfillConnectPromiseback to summary
private void fulfillConnectPromise(ChannelPromise promise, Throwable cause)
readEOFback to summary
pack-priv final void readEOF()
readReadyback to summary
pack-priv final void readReady(long numberBytesPending)
readReadyback to summary
pack-priv abstract void readReady(KQueueRecvByteAllocatorHandle allocHandle)

Deprecated

as a consequence of KQueueRecvByteAllocatorHandle being deprecated. See corresponding docs for further information.

readReadyBeforeback to summary
pack-priv final void readReadyBefore()
readReadyFinallyback to summary
pack-priv final void readReadyFinally(ChannelConfig config)
recvBufAllocHandleback to summary
public KQueueRecvByteAllocatorHandle recvBufAllocHandle()

Overrides io.netty.channel.AbstractChannel.AbstractUnsafe.recvBufAllocHandle.

Implements io.netty.channel.Channel.Unsafe.recvBufAllocHandle.

Doc from io.netty.channel.Channel.Unsafe.recvBufAllocHandle.

Deprecated

as a consequence of KQueueRecvByteAllocatorHandle being deprecated. See corresponding docs for further information.

Return the assigned RecvByteBufAllocator.Handle which will be used to allocate ByteBuf's when receiving data.

Annotations
@Override
shutdownInputback to summary
pack-priv void shutdownInput(boolean readEOF)

Shutdown the input side of the channel.

writeReadyback to summary
pack-priv final void writeReady()