Interface NotificationPublishService

    • 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.
    • 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 waiting
        NullPointerException - 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 unit
        unit - 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 waiting
        NullPointerException - if the notification or unit is null
        IllegalArgumentException - if timeout is negative.