com.knowgate.sms
Class SMSPushAltiria

java.lang.Object
  extended by com.knowgate.sms.SMSPush
      extended by com.knowgate.sms.SMSPushAltiria

public final class SMSPushAltiria
extends SMSPush

Implementation for sending SMS messages with Altiria platform


Constructor Summary
SMSPushAltiria()
           
 
Method Summary
 void close()
          Close SMS HTTP Push Connection
 void connect(java.lang.String sUrl, java.lang.String sUser, java.lang.String sPassword, java.util.Properties oConnectionProps)
          Open HTTP connection for sending messages
 SMSResponse push(SMSMessage oMsg)
          Send SMS
static SMSResponse push(java.lang.String sBaseUrl, java.lang.String sDomain, java.lang.String sAccount, java.lang.String sAuthStr, java.lang.String sMsisdn, java.lang.String sText)
          Open a new connection and send and SMS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMSPushAltiria

public SMSPushAltiria()
Method Detail

connect

public void connect(java.lang.String sUrl,
                    java.lang.String sUser,
                    java.lang.String sPassword,
                    java.util.Properties oConnectionProps)
             throws java.io.IOException,
                    java.sql.SQLException,
                    java.net.MalformedURLException

Open HTTP connection for sending messages

Specified by:
connect in class SMSPush
Parameters:
sUrl - Base URL. Typically it should be "http://www.altiria.net/sustituirPOSTsms/"); where sustituirPOSTsms is a customer specific string provided by Altiria
sUser - Altiria Customer Account Identifier
sPassword - Altiria Customer Account Password
oConnectionProps - Not used, must be null
Throws:
java.io.IOException
java.net.MalformedURLException
java.sql.SQLException

push

public SMSResponse push(SMSMessage oMsg)
                 throws java.io.IOException,
                        java.sql.SQLException,
                        java.lang.IllegalArgumentException,
                        java.io.UnsupportedEncodingException
Send SMS

Specified by:
push in class SMSPush
Parameters:
SMSMessage -
Returns:
SMSResponse
Throws:
java.io.IOException
java.sql.SQLException
java.lang.IllegalArgumentException
java.io.UnsupportedEncodingException

push

public static SMSResponse push(java.lang.String sBaseUrl,
                               java.lang.String sDomain,
                               java.lang.String sAccount,
                               java.lang.String sAuthStr,
                               java.lang.String sMsisdn,
                               java.lang.String sText)
                        throws java.io.IOException,
                               java.lang.IllegalArgumentException
Open a new connection and send and SMS

Parameters:
sBaseUrl - Altiria HTTP base URL
sDomain - Altiria Customer Domain
sAccount - Altiria Customer Account Identifier
sAuthStr - Altiria Customer Account Password
sMsisdn - MSISDN Number with country preffix (no 00 nor +) like 34609090603
sText - Message Text.
Returns:
SMSResponse
Throws:
java.io.IOException
java.lang.IllegalArgumentException

close

public void close()
           throws java.io.IOException,
                  java.sql.SQLException
Description copied from class: SMSPush
Close SMS HTTP Push Connection

Specified by:
close in class SMSPush
Throws:
java.io.IOException
java.sql.SQLException