Package org.smslib.AGateway

Examples of org.smslib.AGateway.AsyncEvents


  }

  @Override
  public AsyncEvents processUnsolicitedEvents(String response) throws IOException
  {
    AsyncEvents event = AsyncEvents.NOTHING;
    if (response.indexOf(getUnsolicitedResponse(0)) >= 0) event = AsyncEvents.INBOUNDMESSAGE;
    else if (response.indexOf(getUnsolicitedResponse(1)) >= 0) event = AsyncEvents.INBOUNDSTATUSREPORTMESSAGE;
    else if (response.indexOf(getUnsolicitedResponse(2)) >= 0) event = AsyncEvents.NOTHING;
    else if (response.indexOf(getUnsolicitedResponse(3)) >= 0) event = AsyncEvents.INBOUNDCALL;
    else if (response.indexOf(getUnsolicitedResponse(4)) >= 0) event = AsyncEvents.USSDRESPONSE;
View Full Code Here


        }
      }
      Logger.getInstance().logDebug("BUFFER: " + buffer, null, getGateway().getGatewayId());
      if (getGateway().getATHandler().isUnsolicitedResponse(buffer.toString()))
      {
        AsyncEvents event = getGateway().getATHandler().processUnsolicitedEvents(buffer.toString());
        if (event == eventResponse && eventResponse != AsyncEvents.NOTHING) { return buffer.toString(); }
        if ((event == AsyncEvents.INBOUNDMESSAGE) || (event == AsyncEvents.INBOUNDSTATUSREPORTMESSAGE) || (event == AsyncEvents.INBOUNDCALL) || (event == AsyncEvents.USSDRESPONSE)) getAsyncNotifier().setEvent(event, buffer.toString());
        return getResponse();
      }
      // Try to interpret error code
View Full Code Here

TOP

Related Classes of org.smslib.AGateway.AsyncEvents

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.