public class EventDiscovery extends java.lang.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.HEADER_POLL_TIMEOUT, HEADER_SUBSCRIPTIONID, N_EVENT, N_EVENTBUNDLE, N_EVENTDATE, N_EVENTDISCOVERY, N_EVENTINFO, N_EVENTMIXINNODETYPE, N_EVENTPRIMARYNODETYPE, N_EVENTTYPE, N_EVENTUSERDATA, N_EVENTUSERID, NAMESPACE, SUBSCRIPTIONDISCOVERY, XML_EVENT, XML_EVENT_LOCAL, XML_EVENT_TRANSACTION_ID, XML_EVENTBUNDLE, XML_EVENTDATE, XML_EVENTDISCOVERY, XML_EVENTIDENTIFIER, XML_EVENTINFO, XML_EVENTMIXINNODETYPE, XML_EVENTPRIMARNODETYPE, XML_EVENTSWITHLOCALFLAG, XML_EVENTSWITHTYPES, XML_EVENTTYPE, XML_EVENTUSERDATA, XML_EVENTUSERID, XML_FILTER, XML_NODETYPE_NAME, XML_NOLOCAL, XML_SUBSCRIPTION, XML_SUBSCRIPTIONID, XML_SUBSCRIPTIONINFO, XML_UUID
Constructor and Description |
---|
EventDiscovery() |
Modifier and Type | Method and Description |
---|---|
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.
|
static EventDiscovery |
createFromXml(org.w3c.dom.Element eventDiscoveryElement)
Build a
EventDiscovery from the specified xml element. |
java.util.Iterator<EventBundle> |
getEventBundles()
Returns an iterator over the
event bundles currently
present on this discovery. |
boolean |
isEmpty()
Returns true, if this event discovery does not report any events (thus
getEventBundles() would return an empty iterator. |
org.w3c.dom.Element |
toXml(org.w3c.dom.Document document)
Returns the Xml representation of this
EventDiscovery as
being present in the POLL response body. |
public void addEventBundle(EventBundle eventBundle)
eventBundle
- Subscription
public java.util.Iterator<EventBundle> getEventBundles()
event bundles
currently
present on this discovery.public boolean isEmpty()
getEventBundles()
would return an empty iterator.getEventBundles()
would return an empty iterator,
false otherwise.public org.w3c.dom.Element toXml(org.w3c.dom.Document document)
EventDiscovery
as
being present in the POLL response body.toXml
in interface XmlSerializable
document
- XmlSerializable.toXml(Document)
public static EventDiscovery createFromXml(org.w3c.dom.Element eventDiscoveryElement)
EventDiscovery
from the specified xml element.eventDiscoveryElement
- EventDiscovery
instance.java.lang.IllegalArgumentException
- if the given document is null
or does not provide the required element.Copyright © 2010 - 2020 Adobe. All Rights Reserved