Interface Channel

    • Method Detail

      • parent

        Channel parent()
        Returns the parent of this channel.
        Returns:
        the parent channel. null if this channel does not have a parent channel.
      • config

        ChannelConfig config()
        Returns the configuration of this channel.
      • isOpen

        boolean isOpen()
        Returns true if the Channel is open and may get active later
      • isRegistered

        boolean isRegistered()
        Returns true if the Channel is registered with an EventLoop.
      • isActive

        boolean isActive()
        Return true if the Channel is active and so connected.
      • localAddress

        java.net.SocketAddress localAddress()
        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.
      • remoteAddress

        java.net.SocketAddress remoteAddress()
        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 DefaultAddressedEnvelope.recipient() to determine the origination of the received message as this method will return null.
      • closeFuture

        ChannelFuture closeFuture()
        Returns the ChannelFuture which will be notified when this channel is closed. This method always returns the same future instance.
      • isWritable

        boolean isWritable()
        Returns true if and only if the I/O thread will perform the requested write operation immediately. Any write requests made when this method returns false are queued until the I/O thread is ready to process the queued write requests.
      • bytesBeforeUnwritable

        long bytesBeforeUnwritable()
        Get how many bytes can be written until isWritable() returns false. This quantity will always be non-negative. If isWritable() is false then 0.
      • bytesBeforeWritable

        long bytesBeforeWritable()
        Get how many bytes must be drained from underlying buffers until isWritable() returns true. This quantity will always be non-negative. If isWritable() is true then 0.
      • unsafe

        Channel.Unsafe unsafe()
        Returns an internal-use-only object that provides unsafe operations.