public final class SMSPushAltiria extends SMSPush
Implementation for sending SMS messages with Altiria platform
Constructor and Description |
---|
SMSPushAltiria() |
Modifier and Type | Method and Description |
---|---|
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
|
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
connect
in class SMSPush
sUrl
- Base URL. Typically it should be "http://www.altiria.net/sustituirPOSTsms/");
where sustituirPOSTsms is a customer specific string provided by AltiriasUser
- Altiria Customer Account IdentifiersPassword
- Altiria Customer Account PasswordoConnectionProps
- Not used, must be nulljava.io.IOException
java.net.MalformedURLException
java.sql.SQLException
public SMSResponse push(SMSMessage oMsg) throws java.io.IOException, java.sql.SQLException, java.lang.IllegalArgumentException, java.io.UnsupportedEncodingException
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
sBaseUrl
- Altiria HTTP base URLsDomain
- Altiria Customer DomainsAccount
- Altiria Customer Account IdentifiersAuthStr
- Altiria Customer Account PasswordsMsisdn
- MSISDN Number with country preffix (no 00 nor +) like 34609090603sText
- Message Text.java.io.IOException
java.lang.IllegalArgumentException