Class AbstractNioChannel

All Implemented Interfaces:
Channel, ChannelOutboundInvoker, AttributeMap, Comparable<Channel>
Direct Known Subclasses:
AbstractNioByteChannel, AbstractNioMessageChannel

public abstract class AbstractNioChannel extends AbstractChannel
Abstract base class for Channel implementations which use a Selector based approach.
  • Field Details

    • logger

      private static final InternalLogger logger
    • ch

      private final SelectableChannel ch
    • readInterestOp

      protected final int readInterestOp
    • selectionKey

      volatile SelectionKey selectionKey
    • readPending

      boolean readPending
    • clearReadPendingRunnable

      private final Runnable clearReadPendingRunnable
    • connectPromise

      private ChannelPromise connectPromise
      The future of the current connection attempt. If not null, subsequent connection attempts will fail.
    • connectTimeoutFuture

      private Future<?> connectTimeoutFuture
    • requestedRemoteAddress

      private SocketAddress requestedRemoteAddress
  • Constructor Details

    • AbstractNioChannel

      protected AbstractNioChannel(Channel parent, SelectableChannel ch, int readInterestOp)
      Create a new instance
      Parameters:
      parent - the parent Channel by which this instance was created. May be null
      ch - the underlying SelectableChannel on which it operates
      readInterestOp - the ops to set to receive data from the SelectableChannel
  • Method Details