public class PayloadBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
String |
build()
Builds your complete payload
|
PayloadBuilder |
consolidationKey(Object value)
This is an arbitrary string used to indicate that multiple messages are logically
the same and that ADM is allowed to drop previously enqueued messages in favor of
this new one
|
PayloadBuilder |
dataField(String key,
Object value)
Adds an custom payload value for the given key.
|
PayloadBuilder |
dataFields(Map<String,?> dataFields) |
PayloadBuilder |
expiresAfter(Object value)
The number of seconds that ADM should retain the message if the device is offline.
|
PayloadBuilder |
md5(Object value)
This is a base-64-encoded MD5 checksum of the data parameter.
|
String |
toString() |
public PayloadBuilder dataField(String key, Object value)
key - of an user custom fieldvalue - of an user custom fieldPayloadBuilder instancepublic PayloadBuilder dataFields(Map<String,?> dataFields)
dataFields, - a map containing custom key/value entriesPayloadBuilder instancepublic PayloadBuilder consolidationKey(Object value)
value - of the consolidation keyPayloadBuilder instancepublic PayloadBuilder expiresAfter(Object value)
value - of the timeout (in seconds)PayloadBuilder instancepublic PayloadBuilder md5(Object value)
value - of the MD5PayloadBuilder instancepublic String build()
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.