|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.notnoop.apns.internal.BatchApnsService
public class BatchApnsService
| Constructor Summary | |
|---|---|
BatchApnsService(ApnsConnection prototype,
ApnsFeedbackConnection feedback,
int batchWaitTimeInSec,
int maxBachWaitTimeInSec,
ThreadFactory tf)
|
|
| Method Summary | |
|---|---|
Map<String,Date> |
getInactiveDevices()
Returns the list of devices that reported failed-delivery attempts to the Apple Feedback services. |
void |
push(ApnsNotification message)
Sends the provided notification message to the desired
destination. |
EnhancedApnsNotification |
push(byte[] deviceToken,
byte[] payload)
Sends a push notification with the provided payload to the
iPhone of deviceToken. |
EnhancedApnsNotification |
push(byte[] deviceToken,
byte[] payload,
int expiry)
|
Collection<EnhancedApnsNotification> |
push(Collection<byte[]> deviceTokens,
byte[] payload)
Sends a bulk push notification with the provided payload to iPhone of deviceTokens set. |
Collection<EnhancedApnsNotification> |
push(Collection<byte[]> deviceTokens,
byte[] payload,
int expiry)
|
Collection<EnhancedApnsNotification> |
push(Collection<String> deviceTokens,
String payload)
Sends a bulk push notification with the provided payload to iPhone of deviceTokens set. |
Collection<EnhancedApnsNotification> |
push(Collection<String> deviceTokens,
String payload,
Date expiry)
|
EnhancedApnsNotification |
push(String deviceToken,
String payload)
Sends a push notification with the provided payload to the
iPhone of deviceToken. |
EnhancedApnsNotification |
push(String deviceToken,
String payload,
Date expiry)
|
void |
start()
Starts the service. |
void |
stop()
Stops the service and frees any allocated resources it created for this service. |
void |
testConnection()
Test that the service is setup properly and the Apple servers are reachable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BatchApnsService(ApnsConnection prototype,
ApnsFeedbackConnection feedback,
int batchWaitTimeInSec,
int maxBachWaitTimeInSec,
ThreadFactory tf)
| Method Detail |
|---|
public void start()
ApnsService
public void stop()
ApnsService
public void testConnection()
throws NetworkIOException
ApnsService
NetworkIOException - if the Apple servers aren't reachable
or the service cannot send notifications for now
public void push(ApnsNotification message)
throws NetworkIOException
ApnsServicemessage to the desired
destination.
push in interface ApnsServiceNetworkIOException - if a network error occured while
attempting to send the message
public EnhancedApnsNotification push(String deviceToken,
String payload)
throws NetworkIOException
ApnsServicepayload 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.
push in interface ApnsServicedeviceToken - the destination iPhone device tokenpayload - The payload message
NetworkIOException - if a network error occured while
attempting to send the message
public EnhancedApnsNotification push(String deviceToken,
String payload,
Date expiry)
throws NetworkIOException
push in interface ApnsServiceNetworkIOException
public EnhancedApnsNotification push(byte[] deviceToken,
byte[] payload)
throws NetworkIOException
ApnsServicepayload 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.
push in interface ApnsServicedeviceToken - the destination iPhone device tokenpayload - The payload message
NetworkIOException - if a network error occurred while
attempting to send the message
public EnhancedApnsNotification push(byte[] deviceToken,
byte[] payload,
int expiry)
throws NetworkIOException
push in interface ApnsServiceNetworkIOException
public Collection<EnhancedApnsNotification> push(Collection<String> deviceTokens,
String payload)
throws NetworkIOException
ApnsServicepayload to iPhone of deviceTokens set.
The payload needs to be a valid JSON object, otherwise it may fail
silently. It is recommended to use PayloadBuilder to create
one.
push in interface ApnsServicedeviceTokens - the destination iPhone device tokenspayload - The payload message
NetworkIOException - if a network error occurred while
attempting to send the message
public Collection<EnhancedApnsNotification> push(Collection<String> deviceTokens,
String payload,
Date expiry)
throws NetworkIOException
push in interface ApnsServiceNetworkIOException
public Collection<EnhancedApnsNotification> push(Collection<byte[]> deviceTokens,
byte[] payload)
throws NetworkIOException
ApnsServicepayload to iPhone of deviceTokens set.
The payload needs to be a valid JSON object, otherwise it may fail
silently. It is recommended to use PayloadBuilder to create
one.
push in interface ApnsServicedeviceTokens - the destination iPhone device tokenspayload - The payload message
NetworkIOException - if a network error occurred while
attempting to send the message
public Collection<EnhancedApnsNotification> push(Collection<byte[]> deviceTokens,
byte[] payload,
int expiry)
throws NetworkIOException
push in interface ApnsServiceNetworkIOException
public Map<String,Date> getInactiveDevices()
throws NetworkIOException
ApnsService
getInactiveDevices in interface ApnsServiceNetworkIOException - if a network error occurred
while retrieving invalid device connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||