org.apache.jackrabbit.webdav.observation
Interface SubscriptionManager


public interface SubscriptionManager

SubscriptionManager interface.


Method Summary
 SubscriptionDiscovery getSubscriptionDiscovery(ObservationResource resource)
          Retrieve the SubscriptionDiscovery object for the given resource.
 EventDiscovery poll(String subscriptionId, ObservationResource resource)
          Retrieve the list of events that occured since the last poll.
 Subscription subscribe(SubscriptionInfo info, String subscriptionId, ObservationResource resource)
          Create a new Subscription or update an existing Subscription..
 void unsubscribe(String subscriptionId, ObservationResource resource)
          Unsubscribe the Subscription with the given id.
 

Method Detail

getSubscriptionDiscovery

public SubscriptionDiscovery getSubscriptionDiscovery(ObservationResource resource)
Retrieve the SubscriptionDiscovery object for the given resource. Note, that the discovery object will be empty if there are no subscriptions present.

Parameters:
resource -

subscribe

public Subscription subscribe(SubscriptionInfo info,
                              String subscriptionId,
                              ObservationResource resource)
                       throws DavException
Create a new Subscription or update an existing Subscription..

Parameters:
info -
subscriptionId -
resource -
Returns:
Subscription that has been created or updated
Throws:
DavException - if the subscription fails

unsubscribe

public void unsubscribe(String subscriptionId,
                        ObservationResource resource)
                 throws DavException
Unsubscribe the Subscription with the given id.

Parameters:
subscriptionId -
resource -
Throws:
DavException

poll

public EventDiscovery poll(String subscriptionId,
                           ObservationResource resource)
                    throws DavException
Retrieve the list of events that occured since the last poll.

Parameters:
subscriptionId - indentifier for the subscription
resource -
Returns:
Throws:
DavException


Copyright © 2005-2006 . All Rights Reserved.