Interface NIOClientSocketHandler

  • All Known Implementing Classes:
    NIOTcpPacketTransport

    public interface NIOClientSocketHandler
    NIOClientSocketHandler
    • Method Detail

      • getId

        String getId()
        Get the unique client identifier
        Returns:
        the unique client identifier
      • getSocketChannel

        SocketChannel getSocketChannel()
        Get the associated socket channel
        Returns:
        the associated socket channel
      • getInputBuffer

        ByteBuffer getInputBuffer()
        Get this client's input buffer
        Returns:
        this client's input buffer
      • getOutputBuffer

        ByteBuffer getOutputBuffer()
        Get this client's output buffer
        Returns:
        this client's output buffer
      • handleIncomingData

        boolean handleIncomingData()
        Process incoming data available in the input buffer
        Returns:
        false on error causing the multiplexer to drop the client handler
      • appendOutgoingData

        boolean appendOutgoingData()
        Append some outgoing data to the output buffer
        Returns:
        false on error causing the multiplexer to drop the client handler
      • hasWriteInterest

        boolean hasWriteInterest()
        Test if this client has things to sends
        Returns:
        true if this client has things to sends
      • onSocketChannelClosed

        void onSocketChannelClosed()
        Called if the multiplexer closes the socket channel after a network error