public abstract static class Message.Builder extends Object
Message objects.| Constructor and Description |
|---|
Message.Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract Message.Builder |
addAttribute(String name,
String value)
Adds a new attribute to the message attributes.
|
abstract Message.Builder |
attributes(Map<String,String> attributes)
Sets the message attributes to the provided map.
|
abstract Message |
build()
Creates a message object.
|
abstract Message.Builder |
clearAttributes()
Clears all message attributes.
|
abstract Message.Builder |
payload(ByteArray payload)
Sets the message payload to the provided
ByteArray. |
abstract Message.Builder |
payload(String payload)
Sets the message payload to the provided string.
|
abstract Message.Builder |
removeAttribute(String name)
Removes an attribute give its name from the message attributes.
|
public abstract Message.Builder payload(String payload)
UTF-8.public abstract Message.Builder payload(ByteArray payload)
ByteArray.public abstract Message.Builder attributes(Map<String,String> attributes)
iana.org/language_tag and
value en could be added to messages to mark them as readable by an English-speaking
subscriber.public abstract Message.Builder addAttribute(String name, String value)
name was
already set, its value is updated.public abstract Message.Builder removeAttribute(String name)
public abstract Message.Builder clearAttributes()
public abstract Message build()
Copyright © 2016 Google. All rights reserved.