|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom._17od.meteorwebsms.api.Meteor
public class Meteor
This class provides a programmatic API to Meteor's (http://www.mymeteor.ie) web based SMS application.
At the time of writing, every Meteor subscriber receives 300 free web based texts a month.
Example usage with no HTTP proxy:
Meteor meteor = new Meteor();
MSISDN recipient = new MSISDN("0867654321");
meteor.login("0851234567", "1234");
meteor.sendMessage("hi u k?", recipient);
meteor.logout();
Example usage with HTTP proxy, no username or password required:
Meteor meteor = new Meteor("www-proxy.domain.com", 8080);
MSISDN recipient = new MSISDN("0867654321");
meteor.login("0851234567", "1234");
meteor.sendMessage("hi u k?", recipient);
meteor.logout();
Example usage with HTTP proxy requiring username or password:
Meteor meteor = new Meteor("www-proxy.domain.com", 8080, "myuser", "mypass");
MSISDN recipient = new MSISDN("0867654321");
meteor.login("0851234567", "1234");
meteor.sendMessage("hi u k?", recipient);
meteor.logout();
| Constructor Summary | |
|---|---|
Meteor()
|
|
Meteor(java.lang.String proxyHostname,
int proxyPort)
|
|
Meteor(java.lang.String proxyHostname,
int proxyPort,
java.lang.String proxyUsername,
java.lang.String proxyPassword)
This constructor initialises the proxy if necessary |
|
| Method Summary | |
|---|---|
java.lang.String |
getControllerURL()
|
java.lang.String |
getInfoURL()
|
java.lang.String |
getLogoutURL()
|
int |
getNumFreeMessagesLeft()
Get the number of free text messages left |
void |
login(java.lang.String username,
java.lang.String password)
Login to the Meteor website using the given username and password |
void |
logout()
Logout of the Meteor website. |
void |
sendMessage(java.lang.String message,
MSISDN recipient)
Send the given message to the given msisdn. |
void |
setControllerURL(java.lang.String controllerURL)
|
void |
setInfoURL(java.lang.String infoURL)
|
void |
setLogoutURL(java.lang.String logoutURL)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Meteor()
public Meteor(java.lang.String proxyHostname,
int proxyPort)
proxyHostname - proxyPort -
public Meteor(java.lang.String proxyHostname,
int proxyPort,
java.lang.String proxyUsername,
java.lang.String proxyPassword)
proxyHostname - proxyPort - proxyUsername - proxyPassword - | Method Detail |
|---|
public void login(java.lang.String username,
java.lang.String password)
throws OperatorException
username - password -
OperatorException
public void sendMessage(java.lang.String message,
MSISDN recipient)
throws OperatorException
sendMessage in interface Operatormessage - The message you want to sendrecipient - The recipient of the message
OperatorException
public int getNumFreeMessagesLeft()
throws OperatorException
This method works by retrieving the page that contains the number of texts you have left and using a regular expression to pull out the number
OperatorException
public void logout()
throws OperatorException
OperatorExceptionpublic java.lang.String getControllerURL()
public void setControllerURL(java.lang.String controllerURL)
public java.lang.String getInfoURL()
public void setInfoURL(java.lang.String infoURL)
public java.lang.String getLogoutURL()
public void setLogoutURL(java.lang.String logoutURL)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||