ISubscriptionClient Interface

public interface ISubscriptionClient extends IMessageEntityClient

SubscriptionClient can be used for all basic interactions with a Service Bus Subscription.

Method Summary

Modifier and Type Method and 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 and Filter 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 and Filter to the current subscription to filter the messages reaching from topic to the subscription.

ReceiveMode getReceiveMode()

Gets the ReceiveMode of the current receiver

Collection<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 ruleName

CompletableFuture<Void> removeRuleAsync(String ruleName)

Asynchronously removes the rule on the subscription identified by ruleName

Inherited Members

com.microsoft.azure.servicebus.IMessageAndSessionPump.abandon(UUID) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandon(UUID,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandon(UUID,Map<String, Object>) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandon(UUID,Map<String, Object>,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandonAsync(UUID) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandonAsync(UUID,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandonAsync(UUID,Map<String, Object>) com.microsoft.azure.servicebus.IMessageAndSessionPump.abandonAsync(UUID,Map<String, Object>,TransactionContext) ICloseable.close() ICloseable.closeAsync() com.microsoft.azure.servicebus.IMessageAndSessionPump.complete(UUID) com.microsoft.azure.servicebus.IMessageAndSessionPump.complete(UUID,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.completeAsync(UUID) com.microsoft.azure.servicebus.IMessageAndSessionPump.completeAsync(UUID,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,Map<String, Object>) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,Map<String, Object>,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,String,String) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,String,String,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,String,String,Map<String, Object>) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetter(UUID,String,String,Map<String, Object>,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,Map<String, Object>) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,Map<String, Object>,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,String,String) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,String,String,TransactionContext) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,String,String,Map<String, Object>) com.microsoft.azure.servicebus.IMessageAndSessionPump.deadLetterAsync(UUID,String,String,Map<String, Object>,TransactionContext) IMessageEntityClient.getEntityPath() IMessageAndSessionPump.getPrefetchCount() com.microsoft.azure.servicebus.IMessageAndSessionPump.registerMessageHandler(IMessageHandler) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerMessageHandler(IMessageHandler,ExecutorService) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerMessageHandler(IMessageHandler,MessageHandlerOptions) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerMessageHandler(IMessageHandler,MessageHandlerOptions,ExecutorService) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerSessionHandler(ISessionHandler) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerSessionHandler(ISessionHandler,ExecutorService) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerSessionHandler(ISessionHandler,SessionHandlerOptions) com.microsoft.azure.servicebus.IMessageAndSessionPump.registerSessionHandler(ISessionHandler,SessionHandlerOptions,ExecutorService) IMessageAndSessionPump.setPrefetchCount(int prefetchCount)

Method Details

addRule

public void addRule(RuleDescription ruleDescription)

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 waiting
ServiceBusException - if add rule failed

addRule

public void addRule(String ruleName, Filter filter)

Adds a rule with specified name and Filter to the current subscription to filter the messages reaching from topic to the subscription.

Parameters:

ruleName - The rule name
filter - The Filter to add.

Throws:

InterruptedException - if the current thread was interrupted while waiting
ServiceBusException - if add rule failed

addRuleAsync

public CompletableFuture 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.

addRuleAsync

public CompletableFuture addRuleAsync(String ruleName, Filter filter)

Asynchronously adds a rule with specified name and Filter to the current subscription to filter the messages reaching from topic to the subscription.

Parameters:

ruleName - The rule name
filter - The Filter to add.

Returns:

a CompletableFuture representing the pending rule add operation.

getReceiveMode

public ReceiveMode getReceiveMode()

Gets the ReceiveMode of the current receiver

Returns:

The receive mode.

getRules

public Collection getRules()

Get all rules associated with the subscription.

Returns:

The collection fo the rules.

Throws:

InterruptedException - if the current thread was interrupted while waiting
ServiceBusException - if get rules failed

getRulesAsync

public CompletableFuture> getRulesAsync()

Get all rules associated with the subscription.

Returns:

a CompletableFuture representing the pending get rules operation.

getSubscriptionName

public String getSubscriptionName()

Gets the subscription name.

Returns:

The subscription name.

getTopicName

public String getTopicName()

Gets the name of the topic, for this subscription.

Returns:

the name of the topic

removeRule

public void removeRule(String ruleName)

Removes the rule on the subscription identified by ruleName

Parameters:

ruleName - The name of rule.

Throws:

InterruptedException - if the current thread was interrupted while waiting
ServiceBusException - if remove rule failed

removeRuleAsync

public CompletableFuture 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.

Applies to