public final class Message
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
org.json.JSONObject |
getAttributes()
Retrieve attributes associated with this message.
|
java.lang.String |
getAuthor()
The global identity of the author of this message.
|
Channel |
getChannel()
Returns the parent channel this message belongs to.
|
java.lang.String |
getChannelSid()
Returns the channel sid of the channel this message belongs to.
|
java.lang.String |
getMessageBody()
The body for this message.
|
long |
getMessageIndex()
Returns the index number for this message.
|
Messages |
getMessages()
Returns the parent messages object this message belongs to.
|
java.lang.String |
getSid()
Returns the identifier for this message.
|
java.lang.String |
getTimeStamp()
The last updated timestamp for this message.
|
java.util.Date |
getTimeStampAsDate()
The last updated timestamp for this message.
|
void |
setAttributes(org.json.JSONObject updatedAttributes,
StatusListener listener)
Change attributes associated with this message.
|
void |
updateMessageBody(java.lang.String body,
StatusListener listener)
Updates the body for a message.
|
public java.lang.String getSid()
public java.lang.String getAuthor()
public java.lang.String getTimeStamp()
public java.util.Date getTimeStampAsDate()
public java.lang.String getMessageBody()
public void updateMessageBody(java.lang.String body, StatusListener listener)
body
- The body for the message.listener
- Listener that will receive callback of the result.public java.lang.String getChannelSid()
public Channel getChannel()
public Messages getMessages()
public long getMessageIndex()
public org.json.JSONObject getAttributes() throws org.json.JSONException
org.json.JSONException
- If attributes could not be parsed.public void setAttributes(org.json.JSONObject updatedAttributes, StatusListener listener)
updatedAttributes
- Message attributes map to fully replace old attributes.listener
- Listener that will receive callback with the result.public void dispose()