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() |
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() |
java.lang.String |
getSid()
Returns the identifier for this message.
|
java.lang.String |
getTimeStamp()
The last updated timestamp for this message.
|
void |
setAttributes(org.json.JSONObject updatedAttributes,
Constants.StatusListener listener)
Change attributes associated with this message.
|
void |
updateMessageBody(java.lang.String body,
Constants.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.lang.String getMessageBody()
public void updateMessageBody(java.lang.String body, Constants.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
public void setAttributes(org.json.JSONObject updatedAttributes, Constants.StatusListener listener)
updatedAttributes
- Message attributes map to fully replace old attributes.listener
- Listener that will receive callback with the result.public void dispose()