Interface EventSink
- All Known Implementing Classes:
EventSinkImpl
public interface EventSink
Interface to manage WS-Eventing subscriptions.
-
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, NotificationSink notificationSink) Sends a Subscribe request.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, NotificationSink notificationSink) Sends a Subscribe request.- Parameters:
actions- the list of operation actions. Operation actions typically have the following format: #WSDL-TARGET-NAMESPACE/#WSDL-PORT-TYPE-NAME/#OPERATION-NAMEexpires- desired expiration time (the hosted service may decide to grant lesser than this). If none is given, the hosting service will take decision.notificationSink- sink where to deliver notifications.- Returns:
- a future object that in case of a success 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, NotificationSink).expires- the desired new expiration duration.- Returns:
- a future object that in case of a success includes a granted expires duration or throws
-
getStatus
Gets the status of a subscription.- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofsubscribe(List, Duration, NotificationSink).- Returns:
- a future object that in case of a success includes the remaining subscription time or throws
-
unsubscribe
Unsubscribes from a subscription.- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofsubscribe(List, Duration, NotificationSink).- Returns:
- a future object that in case of a success includes an empty Object instance or throws
-
unsubscribeAll
void unsubscribeAll()Synchronously unsubscribes all subscriptions.Once this function returns, all running subscriptions have been tried to unsubscribe. Errors are swallowed.
-