Class KQueueDomainDatagramChannel

    • Field Detail

      • active

        protected volatile boolean active
    • Constructor Detail

      • KQueueDomainDatagramChannel

        public KQueueDomainDatagramChannel()
      • KQueueDomainDatagramChannel

        public KQueueDomainDatagramChannel​(int fd)
    • Method Detail

      • doBind

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

        protected void doClose()
                        throws java.lang.Exception
        Description copied from class: AbstractChannel
        Close the Channel
        Throws:
        java.lang.Exception
      • doConnect

        protected boolean doConnect​(java.net.SocketAddress remoteAddress,
                                    java.net.SocketAddress localAddress)
                             throws java.lang.Exception
        Connect to the remote peer
        Throws:
        java.lang.Exception
      • doDisconnect

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

        protected boolean doWriteMessage​(java.lang.Object msg)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isActive

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

        public DomainSocketAddress 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
        Specified by:
        localAddress in interface DomainDatagramChannel
        Overrides:
        localAddress in class AbstractChannel
        Returns:
        the local address of this channel. null if this channel is not bound.
      • peerCredentials

        public PeerCredentials peerCredentials()
                                        throws java.io.IOException
        Returns the unix credentials (uid, gid, pid) of the peer SO_PEERCRED
        Throws:
        java.io.IOException
      • remoteAddress

        public DomainSocketAddress 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
        Specified by:
        remoteAddress in interface DomainDatagramChannel
        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
        Specified by:
        isOpen in interface Channel
      • doBeginRead

        protected final 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
      • newDirectBuffer

        protected final ByteBuf newDirectBuffer​(ByteBuf buf)
        Returns an off-heap copy of the specified ByteBuf, and releases the original one.
      • newDirectBuffer

        protected final ByteBuf newDirectBuffer​(java.lang.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.
      • checkResolvable

        protected static void checkResolvable​(java.net.InetSocketAddress addr)
      • doReadBytes

        protected final int doReadBytes​(ByteBuf byteBuf)
                                 throws java.lang.Exception
        Read bytes into the given ByteBuf and return the amount.
        Throws:
        java.lang.Exception
      • doWriteBytes

        protected final int doWriteBytes​(ChannelOutboundBuffer in,
                                         ByteBuf buf)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • doConnect0

        protected boolean doConnect0​(java.net.SocketAddress remoteAddress,
                                     java.net.SocketAddress localAddress)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception