Interface TopicNotifications.NotificationRegistration
- All Superinterfaces:
Registration
- Enclosing interface:
- TopicNotifications
The NotificationRegistration also provides operations to control which topic paths the listener will receive notifications for.
-
Method Summary
Modifier and TypeMethodDescriptiondeselect
(TopicSelector selector) Request to stop receiving notifications for all topics matched by the given selector.Request to stop receiving notifications for all topics matched by the given selector.select
(TopicSelector selector) Request to receive notifications for all topics matched by the provided topic selector.Request to receive notifications for all topics matched by the provided selector.Methods inherited from interface com.pushtechnology.diffusion.client.callbacks.Registration
close
-
Method Details
-
select
Request to receive notifications for all topics matched by the provided topic selector.- Parameters:
selector
- the selector to register- Returns:
- a CompletableFuture that completes when a response is
received from the server.
If the selection completes successfully, the CompletableFuture result will be null. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with a
CompletionException
. Common reasons for failure, listed by the exception reported as thecause
, include:PermissionsException
– if the calling session does not haveSELECT_TOPIC
permission for the selector expression;SessionClosedException
– if the session is closed.
-
select
Request to receive notifications for all topics matched by the provided selector.This is equivalent to calling
select(TopicSelector)
with a selector parsed usingTopicSelectors.parse(String)
.- Parameters:
selector
- the selector to register- Returns:
- a CompletableFuture that completes when a response is
received from the server.
If the selection completes successfully, the CompletableFuture result will be null. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with a
CompletionException
. Common reasons for failure, listed by the exception reported as thecause
, include:PermissionsException
– if the calling session does not haveSELECT_TOPIC
permission for the selector expression;SessionClosedException
– if the session is closed.
-
deselect
Request to stop receiving notifications for all topics matched by the given selector.- Parameters:
selector
- the selector to register- Returns:
- a CompletableFuture that completes when a response is
received from the server.
If the deselection completes successfully, the CompletableFuture result will be null. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with a
CompletionException
. Common reasons for failure, listed by the exception reported as thecause
, include:PermissionsException
– if the calling session does not haveSELECT_TOPIC
permission for the selector expression;SessionClosedException
– if the session is closed.
-
deselect
Request to stop receiving notifications for all topics matched by the given selector.This is equivalent to calling
deselect(TopicSelector)
with a selector parsed usingTopicSelectors.parse(String)
.- Parameters:
selector
- the selector to register- Returns:
- a CompletableFuture that completes when a response is
received from the server.
If the deselection completes successfully, the CompletableFuture result will be null. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with a
CompletionException
. Common reasons for failure, listed by the exception reported as thecause
, include:PermissionsException
– if the calling session does not haveSELECT_TOPIC
permission for the selector expression;SessionClosedException
– if the session is closed.
-