Class LocalChannel

    • Field Detail

      • FINISH_READ_FUTURE_UPDATER

        private static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<LocalChannel,​Future> FINISH_READ_FUTURE_UPDATER
      • MAX_READER_STACK_DEPTH

        private static final int MAX_READER_STACK_DEPTH
        See Also:
        Constant Field Values
      • inboundBuffer

        final java.util.Queue<java.lang.Object> inboundBuffer
      • readTask

        private final java.lang.Runnable readTask
      • shutdownHook

        private final java.lang.Runnable shutdownHook
      • remoteAddress

        private volatile LocalAddress remoteAddress
      • readInProgress

        private volatile boolean readInProgress
      • writeInProgress

        private volatile boolean writeInProgress
      • finishReadFuture

        private volatile Future<?> finishReadFuture
    • Method Detail

      • config

        public ChannelConfig config()
        Description copied from interface: Channel
        Returns the configuration of this channel.
      • parent

        public LocalServerChannel parent()
        Description copied from interface: Channel
        Returns the parent of this channel.
        Specified by:
        parent in interface Channel
        Overrides:
        parent in class AbstractChannel
        Returns:
        the parent channel. null if this channel does not have a parent channel.
      • localAddress

        public LocalAddress localAddress()
        Description copied from interface: Channel
        Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
        Specified by:
        localAddress in interface Channel
        Overrides:
        localAddress in class AbstractChannel
        Returns:
        the local address of this channel. null if this channel is not bound.
      • remoteAddress

        public LocalAddress remoteAddress()
        Description copied from interface: Channel
        Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
        Specified by:
        remoteAddress in interface Channel
        Overrides:
        remoteAddress in class AbstractChannel
        Returns:
        the remote address of this channel. null if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use DefaultAddressedEnvelope.recipient() to determine the origination of the received message as this method will return null.
      • isOpen

        public boolean isOpen()
        Description copied from interface: Channel
        Returns true if the Channel is open and may get active later
      • isActive

        public boolean isActive()
        Description copied from interface: Channel
        Return true if the Channel is active and so connected.
      • localAddress0

        protected java.net.SocketAddress localAddress0()
        Description copied from class: AbstractChannel
        Returns the SocketAddress which is bound locally.
        Specified by:
        localAddress0 in class AbstractChannel
      • doRegister

        protected void doRegister()
                           throws java.lang.Exception
        Description copied from class: AbstractChannel
        Is called after the Channel is registered with its EventLoop as part of the register process. Sub-classes may override this method
        Overrides:
        doRegister in class AbstractChannel
        Throws:
        java.lang.Exception
      • doBind

        protected void doBind​(java.net.SocketAddress localAddress)
                       throws java.lang.Exception
        Description copied from class: AbstractChannel
        Bind the Channel to the SocketAddress
        Specified by:
        doBind in class AbstractChannel
        Throws:
        java.lang.Exception
      • doDisconnect

        protected void doDisconnect()
                             throws java.lang.Exception
        Description copied from class: AbstractChannel
        Disconnect this Channel from its remote peer
        Specified by:
        doDisconnect in class AbstractChannel
        Throws:
        java.lang.Exception
      • tryClose

        private void tryClose​(boolean isActive)
      • readInbound

        private void readInbound()
      • doBeginRead

        protected void doBeginRead()
                            throws java.lang.Exception
        Description copied from class: AbstractChannel
        Schedule a read operation.
        Specified by:
        doBeginRead in class AbstractChannel
        Throws:
        java.lang.Exception
      • finishPeerRead

        private void finishPeerRead​(LocalChannel peer)
      • runFinishPeerReadTask

        private void runFinishPeerReadTask​(LocalChannel peer)
      • releaseInboundBuffers

        private void releaseInboundBuffers()
      • finishPeerRead0

        private void finishPeerRead0​(LocalChannel peer)