Package com.microsoft.azure.servicebus
Interface ISubscriptionClient
-
- All Superinterfaces:
ICloseable
,IMessageAndSessionPump
,IMessageEntityClient
- All Known Implementing Classes:
SubscriptionClient
public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSessionPump
SubscriptionClient can be used for all basic interactions with a Service Bus Subscription.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRule(RuleDescription ruleDescription)
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.void
addRule(String ruleName, Filter filter)
Adds a rule with specified name andFilter
to the current subscription to filter the messages reaching from topic to the subscription.CompletableFuture<Void>
addRuleAsync(RuleDescription ruleDescription)
Asynchronously adds a rule to the current subscription to filter the messages reaching from topic to the subscription.CompletableFuture<Void>
addRuleAsync(String ruleName, Filter filter)
Asynchronously adds a rule with specified name andFilter
to the current subscription to filter the messages reaching from topic to the subscription.ReceiveMode
getReceiveMode()
Gets theReceiveMode
of the current receiverCollection<RuleDescription>
getRules()
Get all rules associated with the subscription.CompletableFuture<Collection<RuleDescription>>
getRulesAsync()
Get all rules associated with the subscription.String
getSubscriptionName()
Gets the subscription name.String
getTopicName()
Gets the name of the topic, for this subscription.void
removeRule(String ruleName)
Removes the rule on the subscription identified by ruleNameCompletableFuture<Void>
removeRuleAsync(String ruleName)
Asynchronously removes the rule on the subscription identified by ruleName-
Methods inherited from interface com.microsoft.azure.servicebus.ICloseable
close, closeAsync
-
Methods inherited from interface com.microsoft.azure.servicebus.IMessageAndSessionPump
abandon, abandon, abandon, abandon, abandonAsync, abandonAsync, abandonAsync, abandonAsync, complete, complete, completeAsync, completeAsync, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, getPrefetchCount, registerMessageHandler, registerMessageHandler, registerMessageHandler, registerMessageHandler, registerSessionHandler, registerSessionHandler, registerSessionHandler, registerSessionHandler, setPrefetchCount
-
Methods inherited from interface com.microsoft.azure.servicebus.IMessageEntityClient
getEntityPath
-
-
-
-
Method Detail
-
getReceiveMode
ReceiveMode getReceiveMode()
Gets theReceiveMode
of the current receiver- Returns:
- The receive mode.
-
addRule
void addRule(RuleDescription ruleDescription) throws InterruptedException, ServiceBusException
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.- Parameters:
ruleDescription
- The rule description that provides the rule to add.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if add rule failed
-
addRuleAsync
CompletableFuture<Void> addRuleAsync(RuleDescription ruleDescription)
Asynchronously adds a rule to the current subscription to filter the messages reaching from topic to the subscription.- Parameters:
ruleDescription
- The rule description that provides the rule to add.- Returns:
- a CompletableFuture representing the pending rule add operation.
-
addRule
void addRule(String ruleName, Filter filter) throws InterruptedException, ServiceBusException
Adds a rule with specified name andFilter
to the current subscription to filter the messages reaching from topic to the subscription.- Parameters:
ruleName
- The rule namefilter
- TheFilter
to add.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if add rule failed
-
addRuleAsync
CompletableFuture<Void> addRuleAsync(String ruleName, Filter filter)
Asynchronously adds a rule with specified name andFilter
to the current subscription to filter the messages reaching from topic to the subscription.- Parameters:
ruleName
- The rule namefilter
- TheFilter
to add.- Returns:
- a CompletableFuture representing the pending rule add operation.
-
removeRuleAsync
CompletableFuture<Void> removeRuleAsync(String ruleName)
Asynchronously removes the rule on the subscription identified by ruleName- Parameters:
ruleName
- he name of rule.- Returns:
- a CompletableFuture representing the pending rule remove operation.
-
removeRule
void removeRule(String ruleName) throws InterruptedException, ServiceBusException
Removes the rule on the subscription identified by ruleName- Parameters:
ruleName
- The name of rule.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if remove rule failed
-
getRules
Collection<RuleDescription> getRules() throws ServiceBusException, InterruptedException
Get all rules associated with the subscription.- Returns:
- The collection fo the rules.
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if get rules failed
-
getRulesAsync
CompletableFuture<Collection<RuleDescription>> getRulesAsync()
Get all rules associated with the subscription.- Returns:
- a CompletableFuture representing the pending get rules operation.
-
getTopicName
String getTopicName()
Gets the name of the topic, for this subscription.- Returns:
- the name of the topic
-
getSubscriptionName
String getSubscriptionName()
Gets the subscription name.- Returns:
- The subscription name.
-
-