@Override public void putNotification(final Notification notification) throws InterruptedException { domPublishService.putNotification(toDomNotification(notification)); }
@Override public ListenableFuture<?> offerNotification(final DOMNotification notification, final long timeout, final TimeUnit unit) throws InterruptedException { return delegate().offerNotification(notification, timeout, unit); } }
@Override public ListenableFuture<?> putNotification(final DOMNotification notification) throws InterruptedException { return delegate().putNotification(notification); }
@Override public ListenableFuture<? extends Object> offerNotification(final Notification notification) { ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification)); return DOMNotificationPublishService.REJECTED.equals(offerResult) ? NotificationPublishService.REJECTED : offerResult; }
@Override public ListenableFuture<? extends Object> putNotification(final DOMNotification notification) throws InterruptedException { return delegate().putNotification(notification); }
@Override public ListenableFuture<? extends Object> offerNotification(final DOMNotification notification) { return delegate().offerNotification(notification); }
private void publishNotification(final DOMNotification notification, TopicId topicId) { final ContainerNode topicNotification = Builders.containerBuilder().withNodeIdentifier(TOPIC_NOTIFICATION_ARG) .withChild(ImmutableNodes.leafNode(TOPIC_ID_ARG, topicId)) .withChild(ImmutableNodes.leafNode(EVENT_SOURCE_ARG, mount.getNodeId())).withChild(encapsulate(notification)) .build(); try { domPublish.putNotification(new TopicDOMNotification(topicNotification)); } catch (final InterruptedException e) { throw Throwables.propagate(e); } }
@Override public ListenableFuture<? extends Object> offerNotification(final Notification notification, final int timeout, final TimeUnit unit) throws InterruptedException { ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification), timeout, unit); return DOMNotificationPublishService.REJECTED.equals(offerResult) ? NotificationPublishService.REJECTED : offerResult; }
@Override public ListenableFuture<? extends Object> offerNotification(final DOMNotification notification, final long timeout, final TimeUnit unit) throws InterruptedException { return delegate().offerNotification(notification, timeout, unit); } }
@Override public ListenableFuture<?> offerNotification(final DOMNotification notification) { return delegate().offerNotification(notification); }