Class MO
- java.lang.Object
-
- com.nexmo.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
All Methods Instance Methods Concrete Methods 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 Detail
-
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 Detail
-
setTextData
public void setTextData(java.lang.String text, java.lang.String keyword)
-
setBinaryData
public void setBinaryData(byte[] binaryMessageBody, byte[] userDataHeader)
-
setConcatenationData
public void setConcatenationData(java.lang.String concatReferenceNumber, int concatTotalParts, int concatPartNumber)
-
setNetworkCode
public void setNetworkCode(java.lang.String networkCode)
-
setSessionId
public void setSessionId(java.lang.String sessionId)
-
getMessageId
public java.lang.String getMessageId()
- Returns:
- String the id assigned to this message by Nexmo before delivery
-
getMessageType
public MO.MESSAGE_TYPE getMessageType()
- Returns:
- MESSAGE_TYPE describes what type of payload this message carries, eg, 8 bit text, unicode text or raw binary
-
getSender
public java.lang.String getSender()
- Returns:
- String the phone number of the end user that sent this message
-
getDestination
public java.lang.String getDestination()
- Returns:
- String the short-code/long code number that the end user sent the message to
-
getNetworkCode
public java.lang.String getNetworkCode()
- Returns:
- String the network code (if available) of the end user
-
getKeyword
public java.lang.String 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
public java.lang.String getMessageBody()
- Returns:
- String The message payload if this is a TEXT or UNICODE message
-
getBinaryMessageBody
public byte[] getBinaryMessageBody()
- Returns:
- byte[] the raw binary payload if this is a BINARY message
-
getUserDataHeader
public byte[] getUserDataHeader()
- Returns:
- byte[] the raw binary user-data-header if applicable for this message
-
getPrice
public java.math.BigDecimal getPrice()
- Returns:
- BigDecimal if a price was charged for receiving this message, then that is available here
-
getSessionId
public java.lang.String getSessionId()
- Returns:
- String if this field is populated, then the value should be returned in any MT response
-
isConcat
public boolean isConcat()
- Returns:
- boolean is this message part of a concatenated message that needs re-assembly
-
getConcatReferenceNumber
public java.lang.String getConcatReferenceNumber()
- Returns:
- String if this message is part of a concatenated set, then this is the reference id that groups the parts together
-
getConcatTotalParts
public int getConcatTotalParts()
- Returns:
- String if this message is part of a concatenated set, then this is the total number of parts in the set
-
getConcatPartNumber
public int 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
public java.util.Date getTimeStamp()
- Returns:
- the timestamp this message was originally received by Nexmo
-
-