public class UnifiedMessage extends Object
To construct a message use the UnifiedMessage.Builder like this :
// Sending an UnifiedMessage
UnifiedMessage unifiedMessage = new UnifiedMessage.Builder()
.pushApplicationId("c7fc6525-5506-4ca9-9cf1-55cc261ddb9c")
.masterSecret("8b2f43a9-23c8-44fe-bee9-d6b0af9e316b")
.alert("Hello")
.sound("default")
.variants(Arrays.asList("c3f0a94f-48de-4b77-a08e-68114460857e")) //e.g. HR_Premium
.aliases(Arrays.asList("mike", "john"))
.categories(Arrays.asList("sport","world cup"))
.deviceType(Arrays.asList("iPad","AndroidTablet"))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
UnifiedMessage.Builder
A builder to provide a fluent API
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAliases()
Get a list of "identifiers", like username or email address.
|
Map<String,Object> |
getAttributes()
Get a map containing various key-value pairs, that represent application
specific values.
|
Set |
getCategories()
Get a category list, a category is a semantical tag.
|
List<String> |
getDeviceType()
Get a filter for notifying only users running a certain device.
|
String |
getMasterSecret()
Get the masterSecret used to authenticate against the Push Server.
|
String |
getPushApplicationId()
Get the push Application Id.
|
String |
getSimplePush()
Get the key-value pair represented by a String and
used by the Simple Push Networks.
|
List<String> |
getVariants()
Get A filter for notifying only specific mobile variants of the Push Application.
|
public String getPushApplicationId()
public String getMasterSecret()
public List<String> getAliases()
public List<String> getVariants()
public Map<String,Object> getAttributes()
public Set getCategories()
public List<String> getDeviceType()
public String getSimplePush()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.