Package org.smslib

Examples of org.smslib.TimeoutException


      while (true)
      {
        try
        {
          if (this.bufferStart == this.bufferEnd) wait(Service.getInstance().getSettings().SERIAL_TIMEOUT);
          if (this.bufferStart == this.bufferEnd) throw new TimeoutException("No response from device.");
          c = this.buffer[this.bufferStart];
          this.bufferStart++;
          if (this.bufferStart == Service.getInstance().getSettings().SERIAL_BUFFER_SIZE) this.bufferStart = 0;
          return c;
        }
View Full Code Here


      msg.setFailureCause(FailureCauses.BAD_FORMAT);
      Logger.getInstance().logError("Message Format not accepted.", e, getGatewayId());
      return false;
    } catch (ResponseTimeoutException e) {
      Logger.getInstance().logError("Message could not be sent.", e, getGatewayId());
      throw new TimeoutException(e.getMessage());
    } catch (InvalidResponseException e) {
      Logger.getInstance().logError("Message could not be sent.", e, getGatewayId());
      throw new IOException("InvalidResponseException: ", e);
    } catch (NegativeResponseException e) {
      Logger.getInstance().logError("Message could not be sent.", e, getGatewayId());
View Full Code Here

TOP

Related Classes of org.smslib.TimeoutException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.