Package com.vonage.client.sms.messages
Class TextMessage
java.lang.Object
com.vonage.client.sms.messages.Message
com.vonage.client.sms.messages.TextMessage
public class TextMessage extends Message
Represents the details of a plain-text message that is to be submitted via the Vonage REST api.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vonage.client.sms.messages.Message
Message.MessageClass, Message.MessageType -
Constructor Summary
Constructors Constructor Description TextMessage(java.lang.String from, java.lang.String to, java.lang.String messageBody)Instantiate a new text-message request.
This message will be submitted as a regular 8 bit text messageTextMessage(java.lang.String from, java.lang.String to, java.lang.String messageBody, boolean unicode)Instantiate a new text-message request.
This message will be submitted as a regular 8 bit text message -
Method Summary
Modifier and Type Method Description voidaddParams(org.apache.http.client.methods.RequestBuilder request)java.lang.StringgetMessageBody()Message.MessageTypegetType()booleanisUnicode()Methods inherited from class com.vonage.client.sms.messages.Message
getCallbackUrl, getClientReference, getFrom, getMessageClass, getStatusReportRequired, getTimeToLive, getTo, setCallbackUrl, setClientReference, setMessageClass, setStatusReportRequired, setTimeToLive
-
Constructor Details
-
TextMessage
Instantiate a new text-message request.
This message will be submitted as a regular 8 bit text message- Parameters:
from- 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 11 chars)to- the phone number of the handset that you wish to send the message tomessageBody- The text of the message to be sent to the handset
-
TextMessage
public TextMessage(java.lang.String from, java.lang.String to, java.lang.String messageBody, boolean unicode)Instantiate a new text-message request.
This message will be submitted as a regular 8 bit text message- Parameters:
from- 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 11 chars)to- the phone number of the handset that you wish to send the message tomessageBody- The text of the message to be sent to the handset
-
-
Method Details
-
getMessageBody
- Returns:
- String The text of the message to be sent to the handset
-
isUnicode
- Returns:
- boolean This flag is set to true if the message needs to be submitted as a unicode message. This would be for scenario's where the message contains text that does not fit within the Latin GSM alphabet. Examples would be messages to be sent in non-western scripts, such as Arabic, Kanji, Chinese, etc.
-
getType
-
addParams
-