public interface Message
QueueService
to an external service or to another vault.
It contains a list of message items that can be used as identifiers,
and a small set of attributes that can be used as general purpose parameters.Modifier and Type | Method and Description |
---|---|
Message |
appendPath(String connection,
String path)
Appends a path to a specific connection's base URL for this Message.
|
Message |
appendPathWithTokens(String connection,
String token)
Appends a path to a specific connection's base URL using a valid Vault or custom token which will be resolved on send.
|
<T> T |
getAttribute(String name,
MessageAttributeValueType<T> type)
Retrieves an attribute set by
setAttribute(String, Object) . |
List<String> |
getMessageItems()
Retrieves an immutable List of String items set by
setMessageItems(List) . |
Message |
setAttribute(String name,
Object value)
Sets an attribute with name and value.
|
Message |
setAttributeWithToken(String name,
String token)
Sets an attribute with the name and value of a valid message token.
|
Message |
setMessageItems(List<String> items)
Sets a list of message items for this Message.
|
Message appendPath(String connection, String path)
connection
- The connection name to append a path to. Must be a valid external connection on the specified queue.path
- path to append to the connection's base URLMessage appendPathWithTokens(String connection, String token)
connection
- The connection name to append a path to. Must be a valid external connection on the specified queue.token
- The string value of a valid message token. Cannot exceed 100 characters.Message setMessageItems(List<String> items)
items
- A List of items to add to this Message. Each item String can not exceed 100 characters. The List can not exceed 500 items.<T> T getAttribute(String name, MessageAttributeValueType<T> type)
setAttribute(String, Object)
.T
- type of data requestedname
- the name of the given attributetype
- type of value that is expected to be returnedMessage setAttributeWithToken(String name, String token)
Valid message tokens are:
TokenRequest
name
- The key to use for the name-value pair. Cannot exceed 40 characters.token
- The string value of a valid message token. Cannot exceed 100 characters.Message setAttribute(String name, Object value)
name
- The key to use for the name-value pair. Cannot exceed 40 characters.value
- The value to set for the name-value pair. Type must be supported by JSON.List<String> getMessageItems()
setMessageItems(List)
.Copyright © Veeva Systems 2017–2022. All rights reserved.