📄 smsservice.java
字号:
/**
* @author philip gleghorn <pgleghorn at fatwire.com>
*
*/
public abstract class SMSService {
/**
* Create a new SMSService object. This object provides method to send
* simple, flash and WAP Push messages, to check the account message limit and
* monetary balance.
*
*/
public SMSService() {
super();
}
/**
* Get the message limit, how many more messages can be sent.
*
* @return Message limit
*/
abstract public int getAccountMessageLimit();
/**
* Get the account balance currency, this is a 3-character code of the
* balance currency, probably ISO 4217 format, eg GBP for UK Pounds
*
* @return Currency string
*/
abstract public String getAccountBalanceCurrency();
/**
* Get the account balance, a monetary amount.
*
* @return Account balance
*/
abstract public float getAccountBalance();
/**
* Sends a simple SMS to the recipient phone(s). The standard size limit for
* a SMS is 160 bytes. If the message length exceeds this then the message
* will be built from multiple messages reconstructed on the phone. This
* will consequently cost more, one unit per each component message sent.
*
* @param msgTo
* The number of the phone that you wish to send to. The number
* should be in full International Format, including the Country
* Code. For example 447700912345 for a UK mobile. You can put
* more than one number in here in which case you should separate
* the numbers with a comma - for example
* 447700912345,447700912346.
* @param msgBody
* The text of the sms message. Special characters will be
* encoded.
*/
abstract public void sendSimpleSMS(String msgTo, String msgBody);
/**
* Sends a flash SMS to the recipient phone(s). The standard size limit for
* a SMS is 160 bytes. If the message length exceeds this then the message
* will be broken into multiple flash messages, but these cannot be
* reconstructed on the phone, which is probably undesirable. This
* will consequently cost more, one unit per each component message sent. A
* flash message differs from a simple SMS in the following ways:
* <ul>
* <li> the message is immediately displayed on the screen when received
* <li> it is not automatically saved to the phone, that is an optional
* manual step
* <li> it is not possible to reply, chat, forward, move, rename or copy to
* calendar.
* </ul>
* Details like URLs, email addresses and phone numbers can still be
* activated from within the message.
*
* @param msgTo
* The number of the phone that you wish to send to. The number
* should be in full International Format, including the Country
* Code. For example 447700912345 for a UK mobile. You can put
* more than one number in here in which case you should separate
* the numbers with a comma - for example
* 447700912345,447700912346.
* @param msgBody
* The text of the flash sms message. Special characters will be
* encoded.
*/
abstract public void sendFlashSMS(String msgTo, String msgBody);
/**
* Sends a WAP Push SMS to the recipient phone(s). A WAP Push SMS directs
* the recipient phone to a URL. A WAP Push SMS is automatically saved to
* the phone.
*
* @param msgTo
* The number of the phone that you wish to send to. The number
* should be in full International Format, including the Country
* Code. For example 447700912345 for a UK mobile. You can put
* more than one number in here in which case you should separate
* the numbers with a comma - for example
* 447700912345,447700912346.
* @param msgUrl
* A text string specifying the URI indicating the service.
* @param msgTitle
* A text string that will be displayed on the recipients handset
* when the notification is received.
*/
abstract public void sendWAPPushSMS(String msgTo, String msgUrl,
String msgTitle);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -