public interface MpnsService
MpnsServiceBuilder like:
MpnsService service = MPNS.newService().build()
| Modifier and Type | Method and Description |
|---|---|
void |
push(String subscriptionUri,
MpnsNotification message)
Sends the provided notification
message to the desired
destination. |
void |
push(String subscriptionUri,
String payload,
Collection<? extends Map.Entry<String,String>> headers)
Sends a push notification with the provided
payload to the
iPhone of deviceToken. |
void |
start()
Starts the service.
|
void |
stop()
Stops the service and frees any allocated resources it created for this
service.
|
void push(String subscriptionUri, String payload, Collection<? extends Map.Entry<String,String>> headers) throws NetworkIOException
payload to the
iPhone of deviceToken.
The payload needs to be a valid JSON object, otherwise it may fail
silently. It is recommended to use MpnsServiceBuilder to create
one.subscriptionUri - the destinationpayload - The payload messageNetworkIOException - if a network error occurred while
attempting to send the messagevoid push(String subscriptionUri, MpnsNotification message) throws NetworkIOException
message to the desired
destination.NetworkIOException - if a network error occurred while
attempting to send the messagevoid start()
NetworkIOException - if a network error occurred while
starting the servicevoid stop()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.