|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MpnsService
Represents the connection and interface to the Microsoft MPNS servers.
The service is created by MpnsServiceBuilder like:
MpnsService service = MPNS.newService()
.build()
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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 PayloadBuilder to create
one.
deviceToken - the destination iPhone device tokenpayload - The payload message
NetworkIOException - if a network error occured while
attempting to send the message
void push(String subscriptionUri,
MpnsNotification message)
throws NetworkIOException
message to the desired
destination.
NetworkIOException - if a network error occured while
attempting to send the messagevoid start()
NetworkIOException - if a network error occurred while
starting the servicevoid stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||