Class EventSinkImpl
-
- All Implemented Interfaces:
-
org.somda.sdc.dpws.soap.wseventing.EventSink
public class EventSinkImpl implements EventSink
Default implementation of EventSink.
-
-
Method Summary
Modifier and Type Method Description ListenableFuture<SubscribeResult>subscribe(String filterDialect, List<Object> filters, @Nullable() Duration expires, NotificationSink notificationSink)Sends a Subscribe request. ListenableFuture<Duration>renew(String subscriptionId, Duration expires)Renews a subscription. ListenableFuture<Duration>getStatus(String subscriptionId)Gets the status of a subscription. ListenableFuture<out Object>unsubscribe(String subscriptionId)Unsubscribes from a subscription. voidunsubscribeAll()Synchronously unsubscribes all subscriptions. -
-
Method Detail
-
subscribe
ListenableFuture<SubscribeResult> subscribe(String filterDialect, List<Object> filters, @Nullable() Duration expires, NotificationSink notificationSink)
Sends a Subscribe request.
- Parameters:
filterDialect- the URI that describes the filter object.filters- the list of filter objectsexpires- desired expiration time (the hosted service may decide to grant less than this).notificationSink- sink where to deliver notifications.- Returns:
a future object that in case of a success includes subscription information or throws
-
renew
ListenableFuture<Duration> renew(String subscriptionId, Duration expires)
Renews a subscription.
- Parameters:
subscriptionId- the subscription id obtained in the SubscribeResult of subscribe.expires- the desired new expiration duration.- Returns:
a future object that in case of a success includes a granted expires duration or throws
-
getStatus
ListenableFuture<Duration> getStatus(String subscriptionId)
Gets the status of a subscription.
- Parameters:
subscriptionId- the subscription id obtained in the SubscribeResult of subscribe.- Returns:
a future object that in case of a success includes the remaining subscription time or throws
-
unsubscribe
ListenableFuture<out Object> unsubscribe(String subscriptionId)
Unsubscribes from a subscription.
- Parameters:
subscriptionId- the subscription id obtained in the SubscribeResult of subscribe.- 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.
-
-
-
-