Class EventSinkImpl
java.lang.Object
org.somda.sdc.dpws.soap.wseventing.EventSinkImpl
- All Implemented Interfaces:
EventSink
Default implementation of
EventSink.-
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.ListenableFuture<Object>unsubscribe(String subscriptionId) Unsubscribes from a subscription.voidSynchronously unsubscribes all subscriptions.
-
Method Details
-
subscribe
public com.google.common.util.concurrent.ListenableFuture<SubscribeResult> subscribe(List<String> actions, @Nullable Duration expires, NotificationSink notificationSink) Description copied from interface:EventSinkSends a Subscribe request.- Specified by:
subscribein interfaceEventSink- 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
public com.google.common.util.concurrent.ListenableFuture<Duration> renew(String subscriptionId, Duration expires) Description copied from interface:EventSinkRenews a subscription.- Specified by:
renewin interfaceEventSink- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofEventSink.subscribe(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
public com.google.common.util.concurrent.ListenableFuture<Duration> getStatus(String subscriptionId) Description copied from interface:EventSinkGets the status of a subscription.- Specified by:
getStatusin interfaceEventSink- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofEventSink.subscribe(List, Duration, NotificationSink).- Returns:
- a future object that in case of a success includes the remaining subscription time or throws
-
unsubscribe
public com.google.common.util.concurrent.ListenableFuture<Object> unsubscribe(String subscriptionId) Description copied from interface:EventSinkUnsubscribes from a subscription.- Specified by:
unsubscribein interfaceEventSink- Parameters:
subscriptionId- the subscription id obtained in theSubscribeResultofEventSink.subscribe(List, Duration, NotificationSink).- Returns:
- a future object that in case of a success includes an empty Object instance or throws
-
unsubscribeAll
public void unsubscribeAll()Description copied from interface:EventSinkSynchronously unsubscribes all subscriptions.Once this function returns, all running subscriptions have been tried to unsubscribe. Errors are swallowed.
- Specified by:
unsubscribeAllin interfaceEventSink
-