Class PubSubEventDispatcher

java.lang.Object
org.jivesoftware.openfire.pubsub.PubSubEventDispatcher

public class PubSubEventDispatcher extends Object
Dispatches Pub/Sub events. The following events are supported: Use addListener(PubSubListener) and removeListener(PubSubListener) to add or remove event listeners.
Author:
Guus der Kinderen, guus@goodbytes.nl
  • Constructor Details

    • PubSubEventDispatcher

      public PubSubEventDispatcher()
  • Method Details

    • addListener

      public static void addListener(@Nonnull PubSubListener listener)
      Registers a listener to receive events.
      Parameters:
      listener - the listener.
    • removeListener

      public static void removeListener(@Nonnull PubSubListener listener)
      Unregisters a listener to receive events.
      Parameters:
      listener - the listener.
    • dispatchItemsPublished

      public static void dispatchItemsPublished(@Nonnull Node.UniqueIdentifier nodeId, @Nonnull Collection<PublishedItem> items)
      Dispatches that a collection of items was published on a node to all listeners. All items are published on the same node.
      Parameters:
      nodeId - the identifier of the node on which the items were published.
      items - the published items.
    • dispatchItemsDeleted

      public static void dispatchItemsDeleted(@Nonnull Node.UniqueIdentifier nodeId, @Nonnull Collection<PublishedItem> items)
      Dispatches that a collection of items was deleted from a node to all listeners. All items are deleted from the same node.
      Parameters:
      nodeId - the identifier of the node on which the items were published.
      items - the deleted items.