Class MO
java.lang.Object
com.vonage.client.sms.callback.messages.MO
- All Implemented Interfaces:
java.io.Serializable
public class MO extends java.lang.Object implements java.io.Serializable
This represents an incoming MO callback request
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMO.MESSAGE_TYPEDescribes the type of payload this message carries -
Constructor Summary
Constructors Constructor Description MO(java.lang.String messageId, MO.MESSAGE_TYPE messageType, java.lang.String sender, java.lang.String destination, java.math.BigDecimal price, java.util.Date timeStamp) -
Method Summary
Modifier and Type Method Description byte[]getBinaryMessageBody()intgetConcatPartNumber()java.lang.StringgetConcatReferenceNumber()intgetConcatTotalParts()java.lang.StringgetDestination()java.lang.StringgetKeyword()java.lang.StringgetMessageBody()java.lang.StringgetMessageId()MO.MESSAGE_TYPEgetMessageType()java.lang.StringgetNetworkCode()java.math.BigDecimalgetPrice()java.lang.StringgetSender()java.lang.StringgetSessionId()java.util.DategetTimeStamp()byte[]getUserDataHeader()booleanisConcat()voidsetBinaryData(byte[] binaryMessageBody, byte[] userDataHeader)voidsetConcatenationData(java.lang.String concatReferenceNumber, int concatTotalParts, int concatPartNumber)voidsetNetworkCode(java.lang.String networkCode)voidsetSessionId(java.lang.String sessionId)voidsetTextData(java.lang.String text, java.lang.String keyword)
-
Constructor Details
-
MO
public MO(java.lang.String messageId, MO.MESSAGE_TYPE messageType, java.lang.String sender, java.lang.String destination, java.math.BigDecimal price, java.util.Date timeStamp)
-
-
Method Details
-
setTextData
-
setBinaryData
-
setConcatenationData
public void setConcatenationData(java.lang.String concatReferenceNumber, int concatTotalParts, int concatPartNumber) -
setNetworkCode
-
setSessionId
-
getMessageId
- Returns:
- String the id assigned to this message by Vonage before delivery
-
getMessageType
- Returns:
- MESSAGE_TYPE describes what type of payload this message carries, eg, 8 bit text, unicode text or raw binary
-
getSender
- Returns:
- String the phone number of the end user that sent this message
-
getDestination
- Returns:
- String the short-code/long code number that the end user sent the message to
-
getNetworkCode
- Returns:
- String the network code (if available) of the end user
-
getKeyword
- Returns:
- String return the first keyword of the message. If this is a shared short-code then this is what the message will have been routed by.
-
getMessageBody
- Returns:
- String The message payload if this is a TEXT or UNICODE message
-
getBinaryMessageBody
- Returns:
- byte[] the raw binary payload if this is a BINARY message
-
getUserDataHeader
- Returns:
- byte[] the raw binary user-data-header if applicable for this message
-
getPrice
- Returns:
- BigDecimal if a price was charged for receiving this message, then that is available here
-
getSessionId
- Returns:
- String if this field is populated, then the value should be returned in any MT response
-
isConcat
- Returns:
- boolean is this message part of a concatenated message that needs re-assembly
-
getConcatReferenceNumber
- Returns:
- String if this message is part of a concatenated set, then this is the reference id that groups the parts together
-
getConcatTotalParts
- Returns:
- String if this message is part of a concatenated set, then this is the total number of parts in the set
-
getConcatPartNumber
- Returns:
- String if this message is part of a concatenated set, then this is the 'part number' within the set that this message carries
-
getTimeStamp
- Returns:
- the timestamp this message was originally received by Vonage
-