Package org.somda.sdc.dpws.service
Interface EventSinkAccess
- All Known Implementing Classes:
HostedServiceProxyImpl
public interface EventSinkAccess
Offers access to event sink functionality in accordance with WS-Eventing.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture<Duration>Gets the status of a subscription.com.google.common.util.concurrent.ListenableFuture<Duration>Renews a subscription.com.google.common.util.concurrent.ListenableFuture<SubscribeResult>subscribe(List<String> actions, Duration expires, Interceptor notificationSink) Conducts a subscribe.com.google.common.util.concurrent.ListenableFutureunsubscribe(String subscriptionId) Unsubscribes from a subscription.voidSynchronously unsubscribes all subscriptions.
-
Method Details
-
subscribe
com.google.common.util.concurrent.ListenableFuture<SubscribeResult> subscribe(List<String> actions, @Nullable Duration expires, Interceptor notificationSink) Conducts a subscribe.- Parameters:
actions- a list of operation actions to subscribe for.expires- the desired expiration time (the hosted service may decide to grant lesser than this). If none is given, the hosting service will take decision.notificationSink- the sink where to deliver notifications.- Returns:
- a future object that either includes subscription information or throws
-
renew
com.google.common.util.concurrent.ListenableFuture<Duration> renew(String subscriptionId, Duration expires) Renews a subscription.- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofsubscribe(List, Duration, Interceptor).expires- the desired new expiration duration.- Returns:
- a future object that either includes a granted expires duration or throws
-
getStatus
Gets the status of a subscription.- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofsubscribe(List, Duration, Interceptor).- Returns:
- a future object that either includes the remaining subscription time or throws
-
unsubscribe
Unsubscribes from a subscription.- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofsubscribe(List, Duration, Interceptor).- Returns:
- a future object that either delivers an empty object in case of successful unsubscribe or throws
-
unsubscribeAll
void unsubscribeAll()Synchronously unsubscribes all subscriptions.- See Also:
-