@Override public NotificationResult findNotificationsAfterEpoch(String notificationManagerUri,Long epoch) { NotificationResult ret = api.findNotificationsAfterEpoch(callingCtx, notificationManagerUri, epoch); return ret; }
public void run() { while (!shouldQuit) { try { NotificationResult result = notificationApi.findNotificationsAfterEpoch(context, notificationName, currentEpoch); currentEpoch = result.getCurrentEpoch(); for (String change : result.getReferences()) { handleReference(change); } } catch (RaptureException e) { resetApi(); } if (!shouldQuit) { try { sleep(1000); } catch (InterruptedException e) { } } } } }