Interface EventSinkAccess
-
- All Implemented Interfaces:
public interface EventSinkAccessOffers access to event sink functionality in accordance with WS-Eventing.
-
-
Method Summary
Modifier and Type Method Description abstract ListenableFuture<SubscribeResult>subscribe(List<String> actions, @Nullable() Duration expires, Interceptor notificationSink)Subscribes to a set of actions using an action-based filter. abstract ListenableFuture<SubscribeResult>subscribe(String filterDialect, List<Object> filters, @Nullable() Duration expires, Interceptor notificationSink)Generically subscribes to an event source. abstract ListenableFuture<Duration>renew(String subscriptionId, Duration expires)Renews a subscription. abstract ListenableFuture<Duration>getStatus(String subscriptionId)Gets the status of a subscription. abstract ListenableFutureunsubscribe(String subscriptionId)Unsubscribes from a subscription. abstract voidunsubscribeAll()Synchronously unsubscribes all subscriptions. -
-
Method Detail
-
subscribe
abstract ListenableFuture<SubscribeResult> subscribe(List<String> actions, @Nullable() Duration expires, Interceptor notificationSink)
Subscribes to a set of actions using an action-based filter. This is a convenience function to subscribe for action-based filters, which is required to be supported by DPWS.
- Parameters:
actions- a list of operation actions to subscribe for.expires- the desired expiration time (the hosted service may decide to grant less than this).notificationSink- the sink where to deliver notifications.- Returns:
a future object that either includes subscription information or throws
-
subscribe
abstract ListenableFuture<SubscribeResult> subscribe(String filterDialect, List<Object> filters, @Nullable() Duration expires, Interceptor notificationSink)
Generically subscribes to an event source. Use subscribe if action-based filtering is used.
- Parameters:
filterDialect- the filter dialect URI.filters- a list of filter objects towards the subscription.expires- the desired expiration time (the hosted service may decide to grant less or more than this).notificationSink- the sink where to deliver notifications.- Returns:
a future object that either includes subscription information or throws
-
renew
abstract 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 either includes a granted expires duration or throws
-
getStatus
abstract 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 either includes the remaining subscription time or throws
-
unsubscribe
abstract ListenableFuture unsubscribe(String subscriptionId)
Unsubscribes from a subscription.
- Parameters:
subscriptionId- the subscription id obtained in the SubscribeResult of subscribe.- Returns:
a future object that either delivers an empty object in case of successful unsubscribe or throws
-
unsubscribeAll
abstract void unsubscribeAll()
Synchronously unsubscribes all subscriptions.
-
-
-
-