Interface SubscriptionManager
-
- All Known Implementing Classes:
SubscriptionManagerImpl
public interface SubscriptionManager
SubscriptionManager
interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SubscriptionDiscovery
getSubscriptionDiscovery(ObservationResource resource)
Retrieve theSubscriptionDiscovery
object for the given resource.EventDiscovery
poll(String subscriptionId, long timeout, ObservationResource resource)
Retrieve the list of events that occurred since the last poll.Subscription
subscribe(SubscriptionInfo info, String subscriptionId, ObservationResource resource)
Create a newSubscription
or update an existingSubscription
..void
unsubscribe(String subscriptionId, ObservationResource resource)
Unsubscribe theSubscription
with the given id.
-
-
-
Method Detail
-
getSubscriptionDiscovery
SubscriptionDiscovery getSubscriptionDiscovery(ObservationResource resource)
Retrieve theSubscriptionDiscovery
object for the given resource. Note, that the discovery object will be empty if there are no subscriptions present.- Parameters:
resource
-
-
subscribe
Subscription subscribe(SubscriptionInfo info, String subscriptionId, ObservationResource resource) throws DavException
Create a newSubscription
or update an existingSubscription
..- Parameters:
info
-subscriptionId
-resource
-- Returns:
Subscription
that has been created or updated- Throws:
DavException
- if the subscription fails
-
unsubscribe
void unsubscribe(String subscriptionId, ObservationResource resource) throws DavException
Unsubscribe theSubscription
with the given id.- Parameters:
subscriptionId
-resource
-- Throws:
DavException
-
poll
EventDiscovery poll(String subscriptionId, long timeout, ObservationResource resource) throws DavException
Retrieve the list of events that occurred since the last poll.- Parameters:
subscriptionId
- identifier for the subscriptiontimeout
- the time in milliseconds to wait at most for events if none is present currently.resource
-- Returns:
- Throws:
DavException
-
-