FIM.Util.SMS
Class SMSPost
java.lang.Object
|
+--FIM.Util.SMS.SMSPost
- public final class SMSPost
- extends Object
Method Summary |
String[] |
canonicalizeMessage(String message)
|
URL |
getProvider()
Retrieve the URL of the service provider (Base URL). |
protected HTMLForm |
getSMSForm(String page)
|
protected boolean |
insertMessage(HTMLForm form,
String message)
|
protected String |
internalSendSMS(String country,
String provider,
String number,
String message)
|
static void |
main(String[] args)
This class can also be used as stand-alone.
|
static SMSPost |
ORF_SMS()
|
protected boolean |
selectCountry(HTMLForm form,
String country)
|
protected boolean |
selectNumber(HTMLForm form,
String number)
|
protected boolean |
selectProvider(HTMLForm form,
String service)
|
String |
sendSMS(String country,
String provider,
String number,
String message)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROVIDER_MAX
public static final String PROVIDER_MAX
PROVIDER_A1
public static final String PROVIDER_A1
PROVIDER_ONE
public static final String PROVIDER_ONE
PROVIDER_TELERING
public static final String PROVIDER_TELERING
SMSPost
public SMSPost(String provider_url,
String country_prefix,
String provider_prefix,
String number_prefix,
String message_prefix,
int maxMessageLen)
ORF_SMS
public static final SMSPost ORF_SMS()
getProvider
public URL getProvider()
- Retrieve the
URL
of the service provider (Base URL).
- Returns:
- provider base
URL
for pages
sendSMS
public String sendSMS(String country,
String provider,
String number,
String message)
throws CannotSendException
- Returns:
- null on success, error message from server otherwise (status code, not page!)
internalSendSMS
protected String internalSendSMS(String country,
String provider,
String number,
String message)
throws CannotSendException
canonicalizeMessage
public String[] canonicalizeMessage(String message)
getSMSForm
protected HTMLForm getSMSForm(String page)
throws CannotSendException
insertMessage
protected boolean insertMessage(HTMLForm form,
String message)
throws CannotSendException
selectNumber
protected boolean selectNumber(HTMLForm form,
String number)
throws CannotSendException
selectProvider
protected boolean selectProvider(HTMLForm form,
String service)
throws CannotSendException
selectCountry
protected boolean selectCountry(HTMLForm form,
String country)
throws CannotSendException
main
public static void main(String[] args)
throws Exception
- This class can also be used as stand-alone.
Usage: SMSPost country provider number message
Country: Only needed for lion.cc (Österreich, Deutschland, Schweiz)
Provider (Österreich): 676 (Max), 664 (A1), 699 (One) or 650 (Telering)
Number: At least 7 digits
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.