Interface ObservationResource
-
- All Superinterfaces:
DavResource
- All Known Implementing Classes:
DefaultItemCollection,DefaultItemResource,VersionControlledItemCollection,VersionHistoryItemCollection,VersionItemCollection
public interface ObservationResource extends DavResource
ObservationResourceextends theDavResourceinterface by observation relevant METHODS.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinit(SubscriptionManager subsMgr)Initializes this resource.EventDiscoverypoll(String subscriptionId, long timeout)Retrieve the list of events that where recorded for the event listener with the given SubscriptionId.Subscriptionsubscribe(SubscriptionInfo info, String subscriptionId)Subscribe this resource for event listening defined by the specified subscription info.voidunsubscribe(String subscriptionId)Unsubscribe the event listener with the given SubscriptionId.-
Methods inherited from interface org.apache.jackrabbit.webdav.DavResource
addLockManager, addMember, alterProperties, copy, exists, getCollection, getComplianceClass, getDisplayName, getFactory, getHref, getLocator, getLock, getLocks, getMembers, getModificationTime, getProperties, getProperty, getPropertyNames, getResourcePath, getSession, getSupportedMethods, hasLock, isCollection, isLockable, lock, move, refreshLock, removeMember, removeProperty, setProperty, spool, unlock
-
-
-
-
Field Detail
-
METHODS
static final String METHODS
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(SubscriptionManager subsMgr)
Initializes this resource.- Parameters:
subsMgr- subscription manager object
-
subscribe
Subscription subscribe(SubscriptionInfo info, String subscriptionId) throws DavException
Subscribe this resource for event listening defined by the specified subscription info. A subscriptionId may be specified in case an existing subscription should be modified.- Parameters:
info-SubscriptionInfoobject as defined by the request body and headers.subscriptionId- ornullif theSubscriptionIdheader is missing.- Returns:
Subscriptionobject in case the subscription was successful.- Throws:
DavException
-
unsubscribe
void unsubscribe(String subscriptionId) throws DavException
Unsubscribe the event listener with the given SubscriptionId.- Parameters:
subscriptionId- as present in theSubscriptionIdheader.- Throws:
DavException
-
poll
EventDiscovery poll(String subscriptionId, long timeout) throws DavException
Retrieve the list of events that where recorded for the event listener with the given SubscriptionId.- Parameters:
subscriptionId- as present in theSubscriptionIdheader.timeout- as present in theObservationConstants.HEADER_POLL_TIMEOUTheader or 0 (zero) if none is present.- Returns:
EventDiscoveryobject- Throws:
DavException
-
-