public class DefaultPushSender extends Object implements PushSender
Modifier and Type | Class and Description |
---|---|
static class |
DefaultPushSender.Builder
Builder to build Client with more configuration.
|
Modifier and Type | Method and Description |
---|---|
protected String |
buildUrl()
Construct the URL fired against the Unified Push Server
|
TrustStoreConfig |
getCustomTrustStore()
Get the custom trustStore configuration;
|
String |
getMasterSecret()
Get the used masterSecret.
|
ProxyConfig |
getProxy()
Get the proxy cofniguration.
|
String |
getPushApplicationId()
Get the used pushApplicationId.
|
String |
getServerURL()
Get the used server URL.
|
void |
send(UnifiedMessage unifiedMessage)
Sends the given payload to installations of the referenced PushApplication.
|
void |
send(UnifiedMessage unifiedMessage,
MessageResponseCallback callback)
Sends the given payload to installations of the referenced PushApplication.
|
static DefaultPushSender.Builder |
withConfig(String location)
Starts a
DefaultPushSender.Builder using an external config file |
static DefaultPushSender.Builder |
withRootServerURL(String rootServerURL)
Starts a
DefaultPushSender.Builder by providing a UnifiedPush Server URL |
public static DefaultPushSender.Builder withRootServerURL(String rootServerURL)
DefaultPushSender.Builder
by providing a UnifiedPush Server URLrootServerURL
- of the UnifiedPush ServerDefaultPushSender.Builder
instancepublic static DefaultPushSender.Builder withConfig(String location)
DefaultPushSender.Builder
using an external config filelocation
- of the push configuration fileDefaultPushSender.Builder
instanceprotected String buildUrl()
public void send(UnifiedMessage unifiedMessage, MessageResponseCallback callback)
PushSender
MessageResponseCallback
to handle the messagesend
in interface PushSender
unifiedMessage
- the UnifiedMessage
to send.callback
- the MessageResponseCallback
.public void send(UnifiedMessage unifiedMessage)
PushSender
send
in interface PushSender
unifiedMessage
- The UnifiedMessage
to send.public String getServerURL()
getServerURL
in interface PushSender
public ProxyConfig getProxy()
PushSender
getProxy
in interface PushSender
ProxyConfig
public TrustStoreConfig getCustomTrustStore()
PushSender
getCustomTrustStore
in interface PushSender
TrustStoreConfig
public String getPushApplicationId()
PushSender
getPushApplicationId
in interface PushSender
public String getMasterSecret()
PushSender
getMasterSecret
in interface PushSender
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.