mengziyi / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Offer callback for push-message outcome(error/success) #198

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently you need to actively poll push-notification outcomes via:
===
PushQueue.getPushNotifications().{getFailedNotifications,getSuccessfulNotificati
ons()}

Polling for these status has drawbacks:
- new push-notifications might be added meanwhile (inconsistent view)
- polling is bad for getting feedback on time (you have to define polling 
interval)

A much nicer feedback channel would be to include a callback:
===
PushNotificationManager.sendNotification(.... Callback callback) {

 // something went fine
 callback.success(pushedNotification)
 ...
 // something went wrong
 callback.failed(exception, pushedNotification)

Original issue reported on code.google.com by maldana....@gmail.com on 10 Sep 2013 at 9:13

GoogleCodeExporter commented 9 years ago
It will be great if this is addressed in new release. I am waiting for this for 
logging to my splunk.

Original comment by arun.geo...@gmail.com on 21 Nov 2013 at 1:42