ISubscriptionClient Interface

Implements

public interface ISubscriptionClient
extends IMessageEntityClient, IMessageAndSessionPump

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

Method Summary

Modifier and Type Method and Description
abstract void addRule(RuleDescription ruleDescription)

Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.

abstract 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.

abstract CompletableFuture<Void> addRuleAsync(RuleDescription ruleDescription)

Asynchronously adds a rule to the current subscription to filter the messages reaching from topic to the subscription.

abstract 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.

abstract ReceiveMode getReceiveMode()

Gets the ReceiveMode of the current receiver

abstract Collection<RuleDescription> getRules()

Get all rules associated with the subscription.

abstract CompletableFuture<Collection<RuleDescription>> getRulesAsync()

Get all rules associated with the subscription.

abstract String getSubscriptionName()

Gets the subscription name.

abstract String getTopicName()

Gets the name of the topic, for this subscription.

abstract void removeRule(String ruleName)

Removes the rule on the subscription identified by ruleName

abstract CompletableFuture<Void> removeRuleAsync(String ruleName)

Asynchronously removes the rule on the subscription identified by ruleName

Method Details

addRule

public abstract 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 the current thread was interrupted while waiting

addRule

public abstract 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 the current thread was interrupted while waiting

addRuleAsync

public abstract 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 abstract 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 abstract ReceiveMode getReceiveMode()

Gets the ReceiveMode of the current receiver

Returns:

The receive mode.

getRules

public abstract Collection getRules()

Get all rules associated with the subscription.

Returns:

The collection fo the rules.

Throws:

ServiceBusException - if the current thread was interrupted while waiting

InterruptedException

- if the current thread was interrupted while waiting

getRulesAsync

public abstract CompletableFuture<>> getRulesAsync()

Get all rules associated with the subscription.

Returns:

a CompletableFuture representing the pending get rules operation.

getSubscriptionName

public abstract String getSubscriptionName()

Gets the subscription name.

Returns:

The subscription name.

getTopicName

public abstract String getTopicName()

Gets the name of the topic, for this subscription.

Returns:

the name of the topic

removeRule

public abstract 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 the current thread was interrupted while waiting

removeRuleAsync

public abstract 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