@Deprecated
public final class WritableMessage
extends java.lang.Object
Constructor and Description |
---|
WritableMessage()
Deprecated.
Constructs an empty message with no recipients.
|
WritableMessage(java.util.List<java.lang.String> recipientUserIds,
java.lang.String textBody)
Deprecated.
Constructs a message with a list of recipients and a text body.
|
WritableMessage(Message message)
Deprecated.
Constructs a message with the recipients, text body and headers from
message . |
WritableMessage(java.lang.String recipientUserId,
java.lang.String textBody)
Deprecated.
Constructs a message with one recipient and a text body.
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String key,
java.lang.String value)
Deprecated.
Adds a header to the message.
|
void |
addRecipient(java.lang.String userId)
Deprecated.
Adds a recipient to the message.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Deprecated.
Returns the headers.
|
java.lang.String |
getMessageId()
Deprecated.
Returns the message identifier.
|
java.util.List<java.lang.String> |
getRecipientIds()
Deprecated.
Returns the list of recipient user identifiers.
|
java.lang.String |
getTextBody()
Deprecated.
Returns the text body.
|
void |
setTextBody(java.lang.String textBody)
Deprecated.
The text body of the message.
|
public WritableMessage(java.lang.String recipientUserId, java.lang.String textBody)
recipientUserId
- The recipient id.textBody
- The message body.public WritableMessage(java.util.List<java.lang.String> recipientUserIds, java.lang.String textBody)
recipientUserIds
- The recipients id list.textBody
- The message body.public WritableMessage()
public WritableMessage(Message message)
message
. A unique message
identifier will be assigned.message
- Message to get properties frompublic java.lang.String getMessageId()
public void setTextBody(java.lang.String textBody)
textBody
- the text body of the message.public java.lang.String getTextBody()
public void addRecipient(java.lang.String userId)
userId
- the user id of the recipient.public java.util.List<java.lang.String> getRecipientIds()
public void addHeader(java.lang.String key, java.lang.String value)
Message.getHeaders()
key
- the key of the headervalue
- the value of the headerpublic java.util.Map<java.lang.String,java.lang.String> getHeaders()
Copyright 2016, Sinch AB