Class AbstractNioChannel<C extends java.nio.channels.SelectableChannel & java.nio.channels.WritableByteChannel>

    • Field Detail

      • writeTask

        final java.lang.Runnable writeTask
        WriteTask that performs write operations.
      • writeTaskInTaskQueue

        final java.util.concurrent.atomic.AtomicBoolean writeTaskInTaskQueue
        Indicates if there is a AbstractNioChannel.WriteTask in the task queue.
      • writeBufferSize

        final java.util.concurrent.atomic.AtomicInteger writeBufferSize
        Keeps track of the number of bytes that the AbstractNioChannel.WriteRequestQueue currently contains.
      • highWaterMarkCounter

        final java.util.concurrent.atomic.AtomicInteger highWaterMarkCounter
        Keeps track of the highWaterMark.
      • inWriteNowLoop

        boolean inWriteNowLoop
        Boolean that indicates that write operation is in progress.
      • writeSuspended

        boolean writeSuspended
      • localAddress

        private volatile java.net.InetSocketAddress localAddress
      • remoteAddress

        volatile java.net.InetSocketAddress remoteAddress
      • channel

        final C extends java.nio.channels.SelectableChannel & java.nio.channels.WritableByteChannel channel
    • Method Detail

      • getLocalAddress

        public java.net.InetSocketAddress getLocalAddress()
        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.
        Returns:
        the local address of this channel. null if this channel is not bound.
      • getRemoteAddress

        public java.net.InetSocketAddress getRemoteAddress()
        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.
        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 MessageEvent.getRemoteAddress() to determine the origination of the received message as this method will return null.
      • getConfig

        public abstract NioChannelConfig getConfig()
        Description copied from interface: Channel
        Returns the configuration of this channel.
      • setInternalInterestOps

        protected void setInternalInterestOps​(int interestOps)
        Description copied from class: AbstractChannel
        Sets the interestOps property of this channel immediately. This method is intended to be called by an internal component - please do not call it unless you know what you are doing.
        Overrides:
        setInternalInterestOps in class AbstractChannel
      • setClosed

        protected boolean setClosed()
        Description copied from class: AbstractChannel
        Marks this channel as closed. This method is intended to be called by an internal component - please do not call it unless you know what you are doing.
        Overrides:
        setClosed in class AbstractChannel
        Returns:
        true if and only if this channel was not marked as closed yet
      • getLocalSocketAddress

        abstract java.net.InetSocketAddress getLocalSocketAddress()
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getRemoteSocketAddress

        abstract java.net.InetSocketAddress getRemoteSocketAddress()
                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception