|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.webdav.observation.SubscriptionInfo
public class SubscriptionInfo
SubscriptionInfo
class encapsulates the subscription info
that forms the request body of a SUBSCRIBE request.
The following xml layout is defined for the subscription info:
<!ELEMENT subscriptioninfo ( eventtype, nolocal?, filter? ) > <!ELEMENT eventtype ANY > ANY defines any sequence of elements where at least one defines a valid eventtype. Note that a single eventtype must not occur multiple times. <!ELEMENT nolocal EMPTY > <!ELEMENT filter ANY > ANY: any sequence of elements identifying a filter for event listening but at least a single element.
ObservationConstants.XML_SUBSCRIPTIONINFO
Field Summary |
---|
Fields inherited from interface org.apache.jackrabbit.webdav.observation.ObservationConstants |
---|
HEADER_POLL_TIMEOUT, HEADER_SUBSCRIPTIONID, NAMESPACE, SUBSCRIPTIONDISCOVERY, XML_EVENT, XML_EVENT_TRANSACTION_ID, XML_EVENTBUNDLE, XML_EVENTDATE, XML_EVENTDISCOVERY, XML_EVENTIDENTIFIER, XML_EVENTINFO, XML_EVENTTYPE, XML_EVENTUSERDATA, XML_EVENTUSERID, XML_FILTER, XML_NODETYPE_NAME, XML_NOLOCAL, XML_SUBSCRIPTION, XML_SUBSCRIPTIONID, XML_SUBSCRIPTIONINFO, XML_UUID |
Constructor Summary | |
---|---|
SubscriptionInfo(Element reqInfo,
long timeout,
boolean isDeep)
Create a new SubscriptionInfo from the given Xml element
and from additional information that is transported within the request
header:
timeout ,
isDeep
|
|
SubscriptionInfo(EventType[] eventTypes,
boolean isDeep,
long timeout)
Create a new SubscriptionInfo |
|
SubscriptionInfo(EventType[] eventTypes,
Filter[] filters,
boolean noLocal,
boolean isDeep,
long timeout)
Create a new SubscriptionInfo |
Method Summary | |
---|---|
EventType[] |
getEventTypes()
Return array of event type names present in the subscription info. |
Filter[] |
getFilters()
Return all filters defined for this SubscriptionInfo |
Filter[] |
getFilters(String localName,
Namespace namespace)
Return array of filters with the specified name. |
long |
getTimeOut()
Return the timeout as retrieved from the request. |
boolean |
isDeep()
Returns true if the depths header defined a depth other than '0'. |
boolean |
isNoLocal()
Returns true if the ObservationConstants.XML_NOLOCAL element is present in this
subscription info. |
Element |
toXml(Document document)
Xml representation of this SubscriptionInfo . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubscriptionInfo(EventType[] eventTypes, boolean isDeep, long timeout)
SubscriptionInfo
eventTypes
- isDeep
- timeout
- public SubscriptionInfo(EventType[] eventTypes, Filter[] filters, boolean noLocal, boolean isDeep, long timeout)
SubscriptionInfo
eventTypes
- filters
- noLocal
- isDeep
- timeout
- public SubscriptionInfo(Element reqInfo, long timeout, boolean isDeep) throws DavException
SubscriptionInfo
from the given Xml element
and from additional information that is transported within the request
header:
reqInfo
- Xml element present in the request body.timeout
- as defined in the timeout header
.isDeep
- as defined in the depth header
.
IllegalArgumentException
- if the reqInfo element does not contain the mandatory elements.
DavException
Method Detail |
---|
public EventType[] getEventTypes()
public Filter[] getFilters()
SubscriptionInfo
public Filter[] getFilters(String localName, Namespace namespace)
localName
- the filter elments must provide.namespace
-
public boolean isNoLocal()
ObservationConstants.XML_NOLOCAL
element is present in this
subscription info.
ObservationConstants.XML_NOLOCAL
element is present.public boolean isDeep()
depths header
defined a depth other than '0'.
isDeep
true.public long getTimeOut()
public Element toXml(Document document)
SubscriptionInfo
.
toXml
in interface XmlSerializable
document
-
XmlSerializable.toXml(Document)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |