FIM.Util.SMS
Class SMSPost
java.lang.Object
|
+--FIM.Util.SMS.SMSPost
- public final class SMSPost
- extends Object
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)
Lion_SMS
public static final SMSPost Lion_SMS()
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!)
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 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.