public interface Subscriber
SinkHandler.SinkServiceProperties.autoSubscribe()
to false.Modifier and Type | Method and Description |
---|---|
String |
getConfiguredDiffusionTopicSelector()
Returns the configured
diffusionTopicSelector in the framework
configuration of the service. |
CompletableFuture<?> |
subscribe()
Request subscription to configured topics in the Diffusion server.
|
CompletableFuture<?> |
subscribe(String topics)
Request subscription to passed topics in the Diffusion server.
|
CompletableFuture<?> |
unsubscribe(String topics)
Request unsubscription to topics from the Diffusion server.
|
CompletableFuture<?> subscribe()
If the task 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.
If the task fails, the CompletableFuture will complete
exceptionally with a CompletionException
. Common reasons
for failure, listed by the exception reported as the
cause
, include:
DiffusionSecurityException
– if the application
principal does not have sufficient permissions to perform the
operation;
DiffusionClientException
– if some other
exception has been returned from the Diffusion server via the
Diffusion Client API. The cause will provide more detail.
ServiceStateException
– if the service state
is incompatible with the operation.
CompletableFuture<?> subscribe(String topics)
topics
- the topics to subscribe to.
This can be a single topic path or a Diffusion topic
selector. A topic selector is an expression that
identifies one or more topics.
See https://docs .diffusiondata.com/cloud/latest/manual/html/designguide/data /publication/topic_selector_unified.html for more details.
If the task 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.
If the task fails, the CompletableFuture will complete
exceptionally with a CompletionException
. Common reasons
for failure, listed by the exception reported as the
cause
, include:
DiffusionSecurityException
– if the application
principal does not have sufficient permissions to perform the
operation;
DiffusionClientException
– if some other
exception has been returned from the Diffusion server via the
Diffusion Client API. The cause will provide more detail.
ServiceStateException
– if the service state
is incompatible with the operation.
IllegalArgumentException
- if topics is an invalid topic selector
expressionCompletableFuture<?> unsubscribe(String topics)
topics
- the topics to unsubscribe from.
This can be a single topic path or a Diffusion topic
selector. A topic selector is an expression that
identifies one or more topics.
See https://docs .diffusiondata.com/cloud/latest/manual/html/designguide/data /publication/topic_selector_unified.html for more details.
If the task 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.
If the task fails, the CompletableFuture will complete
exceptionally with a CompletionException
. Common reasons
for failure, listed by the exception reported as the
cause
, include:
DiffusionClientException
– if some other
exception has been returned from the Diffusion server via the
Diffusion Client API. The cause will provide more detail.
ServiceStateException
– if the service state
is incompatible with the operation.
IllegalArgumentException
- if topics is an invalid topic selector
expressionString getConfiguredDiffusionTopicSelector()
diffusionTopicSelector
in the framework
configuration of the service.
If not configured, a null value will be returned.
This method can be used to check if the diffusionTopicSelector
is
configured by an application user.
diffusionTopicSelector
in the framework
configuration, or null if not configured.Copyright © 2024 DiffusionData Limited. All rights reserved.