public class SimplePushNotificationSender extends Object implements PushNotificationSender
| Constructor and Description |
|---|
SimplePushNotificationSender() |
| Modifier and Type | Method and Description |
|---|---|
protected HttpURLConnection |
getConnection(String url)
Convenience method to open/establish a HttpURLConnection.
|
protected HttpURLConnection |
put(String url,
String body)
Returns HttpURLConnection that 'puts' the given body to the given URL.
|
void |
sendPushMessage(Variant variant,
Collection<String> tokens,
UnifiedPushMessage pushMessage,
NotificationSenderCallback callback)
Sends SimplePush notifications to all connected clients, that are represented by
the
Collection of channelIDs, for the given SimplePush network. |
public void sendPushMessage(Variant variant, Collection<String> tokens, UnifiedPushMessage pushMessage, NotificationSenderCallback callback)
Collection of channelIDs, for the given SimplePush network.sendPushMessage in interface PushNotificationSendervariant - contains details for the underlying push network, e.g. API Keys/Idstokens - platform specific collection of client identifierspushMessage - payload to be send to the given clientscallback - invoked after submitting the request to the underlying push network to indicate the status
of the request (success or errorprotected HttpURLConnection put(String url, String body) throws IOException
IOExceptionprotected HttpURLConnection getConnection(String url) throws IOException
IOExceptionCopyright © 2014 JBoss by Red Hat. All Rights Reserved.