@Override public void run(){
  logger.debug("Starting ZWave thread: Input");
  SerialMessage recvMessage;
  while (!interrupted()) {
    try {
      if (recvQueue.size() == 0) {
        sendAllowed.release();
      }
      recvMessage=recvQueue.take();
      logger.debug("Receive queue TAKE: Length={}",recvQueue.size());
      logger.debug("Process Message = {}",SerialMessage.bb2hex(recvMessage.getMessageBuffer()));
      handleIncomingMessage(recvMessage);
      sendAllowed.tryAcquire();
    }
 catch (    InterruptedException e) {
      logger.error("Exception during ZWave thread: Input 1. {}",e);
      break;
    }
catch (    Exception e) {
      logger.error("Exception during ZWave thread: Input 2. {}",e);
    }
  }
  logger.debug("Stopped ZWave thread: Input");
}

@ Override public void run ( ) { logger . debug ( "Starting ZWave thread: Input" ) ; SerialMessage recvMessage ; while ( ! interrupted ( ) ) { try { if ( recvQueue . size ( ) == 0 ) { sendAllowed . release ( ) ; } recvMessage = recvQueue . take ( ) ; logger . debug ( "Receive queue TAKE: Length={}" , recvQueue . size ( ) ) ; logger . debug ( "Process Message = {}" , SerialMessage . bb2hex ( recvMessage . getMessageBuffer ( ) ) ) ; handleIncomingMessage ( recvMessage ) ; sendAllowed . tryAcquire ( ) ; } catch ( InterruptedException e ) { logger . error ( "Exception during ZWave thread: Input 1. {}" , e ) ; break ; } catch ( Exception e ) { logger . error ( "Exception during ZWave thread: Input 2. {}" , e ) ; } } logger . debug ( "Stopped ZWave thread: Input" ) ; }
run method . runs the actual receiving process .
