@Override public NotificationInfo getNotification(String notificationUri,String id) { NotificationInfo ret = api.getNotification(callingCtx, notificationUri, id); return ret; }
public void handleReference(String change) { // This change has occurred, do we need to signal someone? if (subscriptions.isEmpty()) { return; } NotificationInfo info = notificationApi.getNotification(context, notificationName, change); if (subscriptions.containsKey(info.getReference())) { Set<RaptureMessageListener<NotificationMessage>> refSubscriptions = subscriptions.get(info.getReference()); for (RaptureMessageListener<NotificationMessage> subscription : refSubscriptions) { try { NotificationMessage msg = JacksonUtil.objectFromJson(info.getContent(), NotificationMessage.class); subscription.signalMessage(msg); } catch (Exception e) { // at least acknowledge it log.debug(ExceptionToString.format(e)); } } } } }