public abstract class Message extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Message.MessageClass
An enum of the valid values that may be supplied to as the message-class parameter of a rest submission.
|
static class |
Message.MessageType |
| Modifier | Constructor and Description |
|---|---|
protected |
Message(Message.MessageType type,
java.lang.String from,
java.lang.String to) |
protected |
Message(Message.MessageType type,
java.lang.String from,
java.lang.String to,
boolean statusReportRequired)
Abstract type for more specific SMS message types.
This constructor exposes the full range of possible parameters and is not for general use Instead, it is accessed via super() in the constructors of various sub-classes that expose a relevant sub-set of the available parameters |
| Modifier and Type | Method and Description |
|---|---|
void |
addParams(org.apache.http.client.methods.RequestBuilder request) |
java.lang.String |
getCallbackUrl() |
java.lang.String |
getClientReference() |
java.lang.String |
getFrom() |
Message.MessageClass |
getMessageClass() |
boolean |
getStatusReportRequired()
Get the value of the 'status-report-req' parameter.
|
java.lang.Long |
getTimeToLive() |
java.lang.String |
getTo() |
Message.MessageType |
getType() |
void |
setCallbackUrl(java.lang.String callbackUrl) |
void |
setClientReference(java.lang.String clientReference) |
void |
setMessageClass(Message.MessageClass messageClass) |
void |
setStatusReportRequired(boolean statusReportRequired)
Set the value of the 'status-report-req' parameter.
|
void |
setTimeToLive(java.lang.Long timeToLive) |
protected Message(Message.MessageType type, java.lang.String from, java.lang.String to)
protected Message(Message.MessageType type, java.lang.String from, java.lang.String to, boolean statusReportRequired)
type - the type of SMS message to be sentfrom - the 'from' address that will be seen on the handset when this message arrives, typically either a
valid short-code / long code that can be replied to, or a short text description of the application
sending the message (Max 15 chars)to - the phone number of the handset you wish to send the message topublic Message.MessageType getType()
public java.lang.String getFrom()
public java.lang.String getTo()
public java.lang.String getClientReference()
public void setClientReference(java.lang.String clientReference)
public Message.MessageClass getMessageClass()
public void setMessageClass(Message.MessageClass messageClass)
public java.lang.Long getTimeToLive()
public void setTimeToLive(java.lang.Long timeToLive)
public java.lang.String getCallbackUrl()
public void setCallbackUrl(java.lang.String callbackUrl)
public boolean getStatusReportRequired()
public void setStatusReportRequired(boolean statusReportRequired)
statusReportRequired - 'true' if status reports are desired, 'false' otherwise.public void addParams(org.apache.http.client.methods.RequestBuilder request)