SubscriptionClient Class
- java.
lang. Object - ClientEntity
- com.
microsoft. azure. servicebus. InitializableEntity - com.
microsoft. azure. servicebus. SubscriptionClient
- com.
- com.
public class SubscriptionClient implements ISubscriptionClient
Field Summary
Modifier and Type | Field and Description |
---|---|
final String | DEFAULT_RULE_NAME |
Constructor Summary
Method Summary
Inherited Members
Field Details
DEFAULT_RULE_NAME
public static final String DEFAULT_RULE_NAME= "$Default"
Constructor Details
SubscriptionClient
public SubscriptionClient(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode)
Parameters:
SubscriptionClient
public SubscriptionClient(String namespace, String subscriptionPath, ClientSettings clientSettings, ReceiveMode receiveMode)
Parameters:
SubscriptionClient
public SubscriptionClient(URI namespaceEndpointURI, String subscriptionPath, ClientSettings clientSettings, ReceiveMode receiveMode)
Parameters:
Method Details
abandon
public void abandon(UUID lockToken)
Parameters:
abandon
public void abandon(UUID lockToken, Map
Parameters:
abandon
public void abandon(UUID lockToken, Map
Parameters:
abandon
public void abandon(UUID lockToken, TransactionContext transaction)
Parameters:
abandonAsync
public CompletableFuture
Parameters:
abandonAsync
public CompletableFuture
Parameters:
abandonAsync
public CompletableFuture
Parameters:
abandonAsync
public CompletableFuture
Parameters:
addRule
public void addRule(RuleDescription ruleDescription)
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
Overrides:
SubscriptionClient.addRule(RuleDescription ruleDescription)Parameters:
Throws:
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.
Overrides:
SubscriptionClient.addRule(String ruleName, Filter filter)Parameters:
Throws:
addRuleAsync
public CompletableFuture
Asynchronously adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
Overrides:
SubscriptionClient.addRuleAsync(RuleDescription ruleDescription)Parameters:
Returns:
addRuleAsync
public CompletableFuture
Asynchronously adds a rule with specified name and Filter to the current subscription to filter the messages reaching from topic to the subscription.
Overrides:
SubscriptionClient.addRuleAsync(String ruleName, Filter filter)Parameters:
Returns:
complete
public void complete(UUID lockToken)
Parameters:
complete
public void complete(UUID lockToken, TransactionContext transaction)
Parameters:
completeAsync
public CompletableFuture
Parameters:
completeAsync
public CompletableFuture
Parameters:
deadLetter
public void deadLetter(UUID lockToken)
Parameters:
deadLetter
public void deadLetter(UUID lockToken, Map
Parameters:
deadLetter
public void deadLetter(UUID lockToken, Map
Parameters:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)
Parameters:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map
Parameters:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map
Parameters:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)
Parameters:
deadLetter
public void deadLetter(UUID lockToken, TransactionContext transaction)
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
deadLetterAsync
public CompletableFuture
Parameters:
getEntityPath
public String getEntityPath()
Gets the path of the entity this client is sending messages to or receiving messages from.
Overrides:
SubscriptionClient.getEntityPath()Returns:
getPrefetchCount
public int getPrefetchCount()
getReceiveMode
public ReceiveMode getReceiveMode()
Gets the ReceiveMode of the current receiver
Overrides:
SubscriptionClient.getReceiveMode()Returns:
getRules
public Collection
Get all rules associated with the subscription.
Overrides:
SubscriptionClient.getRules()Returns:
Throws:
getRulesAsync
public CompletableFuture
Get all rules associated with the subscription.
Overrides:
SubscriptionClient.getRulesAsync()Returns:
getSubscriptionName
public String getSubscriptionName()
Gets the subscription name.
Overrides:
SubscriptionClient.getSubscriptionName()Returns:
getTopicName
public String getTopicName()
Gets the name of the topic, for this subscription.
Overrides:
SubscriptionClient.getTopicName()Returns:
onClose
protected CompletableFuture
registerMessageHandler
public void registerMessageHandler(IMessageHandler handler)
Parameters:
registerMessageHandler
public void registerMessageHandler(IMessageHandler handler, ExecutorService executorService)
Parameters:
registerMessageHandler
public void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions)
Parameters:
registerMessageHandler
public void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions, ExecutorService executorService)
Parameters:
registerSessionHandler
public void registerSessionHandler(ISessionHandler handler)
Parameters:
registerSessionHandler
public void registerSessionHandler(ISessionHandler handler, ExecutorService executorService)
Parameters:
registerSessionHandler
public void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions)
Parameters:
registerSessionHandler
public void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions, ExecutorService executorService)
Parameters:
removeRule
public void removeRule(String ruleName)
Removes the rule on the subscription identified by ruleName
Overrides:
SubscriptionClient.removeRule(String ruleName)Parameters:
Throws:
removeRuleAsync
public CompletableFuture
Asynchronously removes the rule on the subscription identified by ruleName
Overrides:
SubscriptionClient.removeRuleAsync(String ruleName)Parameters:
Returns:
setPrefetchCount
public void setPrefetchCount(int prefetchCount)
Parameters:
Applies to
Azure SDK for Java