Class NetBidibPlainTcpServerSocketHandler

  • All Implemented Interfaces:
    Runnable

    public class NetBidibPlainTcpServerSocketHandler
    extends Thread
    This class is the handler for TCP client connections. Every client connection is handled with its own handler instance.
    • Field Detail

      • MSG_RAW_LOGGER

        protected static final org.slf4j.Logger MSG_RAW_LOGGER
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • parsePackets

        protected void parsePackets​(ByteArrayOutputStream output,
                                    NetMessageHandler messageReceiver,
                                    InetAddress address,
                                    int portNumber)
                             throws org.bidib.jbidibc.messages.exception.ProtocolException
        Throws:
        org.bidib.jbidibc.messages.exception.ProtocolException
      • parseInput

        protected void parseInput​(ByteArrayOutputStream receiveData,
                                  NetMessageHandler messageReceiver,
                                  InetAddress address,
                                  int portNumber)
                           throws org.bidib.jbidibc.messages.exception.ProtocolException
        Parse the received data to process the received bidib packets.
        Parameters:
        receivedData - the received data
        len - the len of the recevided data packet
        Throws:
        org.bidib.jbidibc.messages.exception.ProtocolException