Class EventDiscovery

  • All Implemented Interfaces:
    ObservationConstants, XmlSerializable

    public class EventDiscovery
    extends Object
    implements ObservationConstants, XmlSerializable
    EventDiscovery represents the request body of a successful POLL request. It reveals all events that occurred since the last POLL. The definition what events that particular subscription is interested in was specified with the initial SUBSCRIPTION that started the event listening.
    • Constructor Detail

      • EventDiscovery

        public EventDiscovery()
    • Method Detail

      • addEventBundle

        public void addEventBundle​(EventBundle eventBundle)
        Add the Xml representation of an single 'eventBundle' listing the events that resulted from a change in the server, filtered by the restrictions present in the corresponding subscription.
        eventBundle -
        See Also:
      • getEventBundles

        public Iterator<EventBundle> getEventBundles()
        Returns an iterator over the event bundles currently present on this discovery.
        iterator over event bundles present.
      • isEmpty

        public boolean isEmpty()
        Returns true, if this event discovery does not report any events (thus getEventBundles() would return an empty iterator.
        true if getEventBundles() would return an empty iterator, false otherwise.
      • createFromXml

        public static EventDiscovery createFromXml​(Element eventDiscoveryElement)
        Build a EventDiscovery from the specified xml element.
        eventDiscoveryElement -
        new EventDiscovery instance.
        IllegalArgumentException - if the given document is null or does not provide the required element.