@Override
  protected void doRun() {
    try {
      while (true) {
        boolean read = readAvailableBlocking();

        if (!read) {
          break;
        }
        else {
          if (isStopped) {
            break;
          }

          TimeoutUtil.sleep(mySleepingPolicy.getTimeToSleep(true));
        }
      }
    }
    catch (Exception e) {
      onCommunicationError();
    }
    finally {
      close();
      onExit();
    }
  }
@Override
  protected void doRun()