Agent System POND 1.0 (1.7.2000)

FIM.Util.SMS
Class SMSPost

java.lang.Object
  |
  +--FIM.Util.SMS.SMSPost

public final class SMSPost
extends Object


Field Summary
static String PROVIDER_A1
           
static String PROVIDER_MAX
           
static String PROVIDER_ONE
           
static String PROVIDER_TELERING
           
 
Constructor Summary
SMSPost(String provider_url, String country_prefix, String provider_prefix, String number_prefix, String message_prefix)
           
 
Method Summary
 URL getProvider()
          Retrieve the URL of the service provider (Base URL).
protected  HTMLForm getSMSForm(String page)
           
protected  boolean insertMessage(HTMLForm form, String message)
           
static SMSPost Lion_SMS()
           
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
 

Field Detail

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
Constructor Detail

SMSPost

public SMSPost(String provider_url,
               String country_prefix,
               String provider_prefix,
               String number_prefix,
               String message_prefix)
Method Detail

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

Agent System POND 1.0 (1.7.2000)

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.