Interface NotificationPublishService
-
- All Superinterfaces:
BindingAwareService
,BindingService
- All Known Implementing Classes:
BindingDOMNotificationPublishServiceAdapter
@Deprecated(forRemoval=true) public interface NotificationPublishService extends BindingService
Deprecated, for removal: This API element is subject to removal in a future version.UseNotificationPublishService
insteadANotificationService
which also allows its users to submit YANG-modeled notifications for delivery. There are three methods of submission, following the patters fromBlockingQueue
: -putNotification(Notification)
, which may block indefinitely if the implementation cannot allocate resources to accept the notification, -offerNotification(Notification)
, which does not block if face of resource starvation, -offerNotification(Notification, int, TimeUnit)
, which may block for specified time if resources are thin.The actual delivery to listeners is asynchronous and implementation-specific. Users of this interface should not make any assumptions as to whether the notification has or has not been seen.
-
-
Field Summary
Fields Modifier and Type Field Description static ListenableFuture<Object>
REJECTED
Deprecated, for removal: This API element is subject to removal in a future version.Well-known value indicating that the binding-aware implementation is currently not able to accept a notification.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ListenableFuture<?>
offerNotification(Notification notification)
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification to subscribed listeners.ListenableFuture<?>
offerNotification(Notification notification, int timeout, TimeUnit unit)
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification to subscribed listeners.void
putNotification(Notification notification)
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification to subscribed listeners.
-
-
-
Field Detail
-
REJECTED
static final ListenableFuture<Object> REJECTED
Deprecated, for removal: This API element is subject to removal in a future version.Well-known value indicating that the binding-aware implementation is currently not able to accept a notification.
-
-
Method Detail
-
putNotification
void putNotification(Notification notification) throws InterruptedException
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification to subscribed listeners. This initiates the process of sending the notification, but delivery to the listeners can happen asynchronously, potentially after a call to this method returns. Note: This call will block when the notification queue is full.- Parameters:
notification
- the notification to publish.- Throws:
InterruptedException
- if interrupted while waitingNullPointerException
- if the notification is null
-
offerNotification
ListenableFuture<?> offerNotification(Notification notification)
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification to subscribed listeners. This initiates the process of sending the notification, but delivery to the listeners can happen asynchronously, potentially after a call to this method returns.Still guaranteed not to block. Returns Listenable Future which will complete once.
- Parameters:
notification
- the notification to publish.- Returns:
- A listenable future which will report completion when the service has finished
propagating the notification to its immediate registrants, or
REJECTED
if resource constraints prevent - Throws:
NullPointerException
- if the notification is null
-
offerNotification
ListenableFuture<?> offerNotification(Notification notification, int timeout, TimeUnit unit) throws InterruptedException
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification to subscribed listeners. This initiates the process of sending the notification, but delivery to the listeners can happen asynchronously, potentially after a call to this method returns. This method is guaranteed not to block more than the specified timeout.- Parameters:
notification
- the notification to publish.timeout
- how long to wait before giving up, in units of unitunit
- a TimeUnit determining how to interpret the timeout parameter- Returns:
- A listenable future which will report completion when the service has finished
propagating the notification to its immediate registrants, or
REJECTED
if resource constraints prevent - Throws:
InterruptedException
- if interrupted while waitingNullPointerException
- if the notification or unit is nullIllegalArgumentException
- if timeout is negative.
-
-