@ Override protected void enqueueNotification ( final Notification not ) { final Runnable r = new Runnable ( ) { @ Override public void run ( ) { not . lastRun = System . currentTimeMillis ( ) ; final SubscriptionSummary summary = postNotification ( not . subscriber , not . mimeType , not . payload ) ; if ( ! summary . isLastPublishSuccessful ( ) ) { not . retryCount ++ ; if ( not . retryCount <= 5 ) { retry ( not ) ; } } not . callback . onSummaryInfo ( summary ) ; } } ; exeuctor . execute ( r ) ; }
Enqueues a notification to run . If the notification fails it will be retried every two minutes until 5 attempts are completed . Notifications to the same callback should be delivered successfully in order .