esmska.transfer
Class GatewayInterpreter

java.lang.Object
  extended by esmska.transfer.GatewayInterpreter

public class GatewayInterpreter
extends java.lang.Object

Class that takes care of parsing gateway script files for extracting gateway info and sending messages.


Constructor Summary
GatewayInterpreter()
           
 
Method Summary
 java.lang.String getErrorMessage()
          Get the error message created when sending of the message failed.
 java.lang.String getGatewayMessage()
          Get additional message from gateway.
 boolean sendMessage(SMS sms)
          Send a message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatewayInterpreter

public GatewayInterpreter()
Method Detail

sendMessage

public boolean sendMessage(SMS sms)
Send a message

Parameters:
sms - sms to be sent
Returns:
whether the message was sent successfully

getErrorMessage

public java.lang.String getErrorMessage()
Get the error message created when sending of the message failed. May be null.

Throws:
java.lang.IllegalStateException - when called before sending any sms

getGatewayMessage

public java.lang.String getGatewayMessage()
Get additional message from gateway. May be null.

Throws:
java.lang.IllegalStateException - when called before sending any sms