ManagementClient Class
- java.
lang. Object - com.
microsoft. azure. servicebus. management. ManagementClient
- com.
public class ManagementClient
Synchronous client to perform management operations on Service Bus entities. Use ManagementClientAsync for asynchronous operations.
Constructor Summary
Constructor | Description | |
---|---|---|
ManagementClient(ConnectionStringBuilder connectionStringBuilder) | ||
ManagementClient(URI namespaceEndpointURI, ClientSettings clientSettings) |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Disposes and closes the managementClient. |
Queue |
createQueue(QueueDescription queueDescription)
Creates a new queue in the service namespace with the given name. See QueueDescription for default values of queue properties. |
Queue |
createQueue(String queuePath)
Creates a new queue in the service namespace with the given name. See QueueDescription for default values of queue properties. |
Rule |
createRule(String topicName, String subscriptionName, RuleDescription ruleDescription)
Creates a new rule for a given topic - subscription. See RuleDescription for default values of subscription properties. |
Subscription |
createSubscription(String topicPath, String subscriptionName)
Creates a new subscription for a given topic in the service namespace with the given name. See SubscriptionDescription for default values of subscription properties. |
Subscription |
createSubscription(SubscriptionDescription subscriptionDescription)
Creates a new subscription in the service namespace with the given name. See SubscriptionDescription for default values of subscription properties. |
Subscription |
createSubscription(SubscriptionDescription subscriptionDescription, RuleDescription defaultRule)
Creates a new subscription in the service namespace with the provided default rule. See SubscriptionDescription for default values of subscription properties. |
Topic |
createTopic(String topicPath)
Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties. |
Topic |
createTopic(TopicDescription topicDescription)
Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties. |
void |
deleteQueue(String path)
Deletes the queue described by the path relative to the service namespace base address. |
void |
deleteRule(String topicPath, String subscriptionName, String ruleName)
Deletes the rule for a given topic-subscription. |
void |
deleteSubscription(String topicPath, String subscriptionName)
Deletes the subscription described by the topicPath and the subscriptionName. |
void |
deleteTopic(String path)
Deletes the topic described by the path relative to the service namespace base address. |
Namespace |
getNamespaceInfo()
Retrieves information related to the namespace. Works with any claim (Send/Listen/Manage). |
Queue |
getQueue(String path)
Retrieves a queue from the service namespace |
Queue |
getQueueRuntimeInfo(String path)
Retrieves the runtime information of a queue. |
List<Queue |
getQueues()
Retrieves the list of queues present in the namespace. |
List<Queue |
getQueues(int count, int skip)
Retrieves the list of queues present in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities. |
Rule |
getRule(String topicPath, String subscriptionName, String ruleName)
Retrieves a rule for a given topic and subscription from the service namespace |
List<Rule |
getRules(String topicName, String subscriptionName)
Retrieves the list of rules for a given topic-subscription in the namespace. |
List<Rule |
getRules(String topicName, String subscriptionName, int count, int skip)
Retrieves the list of rules for a given topic-subscription in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities. |
Subscription |
getSubscription(String topicPath, String subscriptionName)
Retrieves a subscription for a given topic from the service namespace |
Subscription |
getSubscriptionRuntimeInfo(String topicPath, String subscriptionName)
Retrieves the runtime information of a subscription in a given topic |
List<Subscription |
getSubscriptions(String topicName)
Retrieves the list of subscriptions for a given topic in the namespace. |
List<Subscription |
getSubscriptions(String topicName, int count, int skip)
Retrieves the list of subscriptions for a given topic in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities. |
Topic |
getTopic(String path)
Retrieves a topic from the service namespace |
Topic |
getTopicRuntimeInfo(String path)
Retrieves the runtime information of a topic |
List<Topic |
getTopics()
Retrieves the list of topics present in the namespace. |
List<Topic |
getTopics(int count, int skip)
Retrieves the list of topics present in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities. |
Boolean |
queueExists(String path)
Checks whether a given queue exists or not. |
Boolean |
ruleExists(String topicPath, String subscriptionName, String ruleName)
Checks whether a given rule exists or not for a given subscription. |
Boolean |
subscriptionExists(String topicPath, String subscriptionName)
Checks whether a given subscription exists or not. |
Boolean |
topicExists(String path)
Checks whether a given topic exists or not. |
Queue |
updateQueue(QueueDescription queueDescription)
Updates an existing queue. |
Rule |
updateRule(String topicName, String subscriptionName, RuleDescription ruleDescription)
Updates an existing rule. |
Subscription |
updateSubscription(SubscriptionDescription subscriptionDescription)
Updates an existing subscription. |
Topic |
updateTopic(TopicDescription topicDescription)
Updates an existing topic. |
Constructor Details
ManagementClient
public ManagementClient(ConnectionStringBuilder connectionStringBuilder)
Parameters:
ManagementClient
public ManagementClient(URI namespaceEndpointURI, ClientSettings clientSettings)
Parameters:
Method Details
close
public void close()
Disposes and closes the managementClient.
Throws:
createQueue
public QueueDescription createQueue(QueueDescription queueDescription)
Creates a new queue in the service namespace with the given name. See QueueDescription for default values of queue properties.
Parameters:
Returns:
QueueDescription of the newly created queue.
Throws:
createQueue
public QueueDescription createQueue(String queuePath)
Creates a new queue in the service namespace with the given name. See QueueDescription for default values of queue properties.
Parameters:
Returns:
QueueDescription of the newly created queue.
Throws:
createRule
public RuleDescription createRule(String topicName, String subscriptionName, RuleDescription ruleDescription)
Creates a new rule for a given topic - subscription. See RuleDescription for default values of subscription properties.
Parameters:
Returns:
RuleDescription of the newly created rule.
Throws:
createSubscription
public SubscriptionDescription createSubscription(String topicPath, String subscriptionName)
Creates a new subscription for a given topic in the service namespace with the given name. See SubscriptionDescription for default values of subscription properties.
Parameters:
Returns:
SubscriptionDescription of the newly created subscription.
Throws:
createSubscription
public SubscriptionDescription createSubscription(SubscriptionDescription subscriptionDescription)
Creates a new subscription in the service namespace with the given name. See SubscriptionDescription for default values of subscription properties.
Parameters:
Returns:
SubscriptionDescription of the newly created subscription.
Throws:
createSubscription
public SubscriptionDescription createSubscription(SubscriptionDescription subscriptionDescription, RuleDescription defaultRule)
Creates a new subscription in the service namespace with the provided default rule. See SubscriptionDescription for default values of subscription properties.
Parameters:
Returns:
SubscriptionDescription of the newly created subscription.
Throws:
createTopic
public TopicDescription createTopic(String topicPath)
Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties.
Parameters:
Returns:
TopicDescription of the newly created topic.
Throws:
createTopic
public TopicDescription createTopic(TopicDescription topicDescription)
Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties.
Parameters:
Returns:
TopicDescription of the newly created topic.
Throws:
deleteQueue
public Void deleteQueue(String path)
Deletes the queue described by the path relative to the service namespace base address.
Parameters:
Throws:
deleteRule
public Void deleteRule(String topicPath, String subscriptionName, String ruleName)
Deletes the rule for a given topic-subscription.
Parameters:
Throws:
deleteSubscription
public Void deleteSubscription(String topicPath, String subscriptionName)
Deletes the subscription described by the topicPath and the subscriptionName.
Parameters:
Throws:
deleteTopic
public Void deleteTopic(String path)
Deletes the topic described by the path relative to the service namespace base address.
Parameters:
Throws:
getNamespaceInfo
public NamespaceInfo getNamespaceInfo()
Retrieves information related to the namespace. Works with any claim (Send/Listen/Manage).
Returns:
Throws:
getQueue
public QueueDescription getQueue(String path)
Retrieves a queue from the service namespace
Parameters:
Returns:
Throws:
getQueueRuntimeInfo
public QueueRuntimeInfo getQueueRuntimeInfo(String path)
Retrieves the runtime information of a queue.
Parameters:
Returns:
Throws:
getQueues
public List
Retrieves the list of queues present in the namespace.
Returns:
Throws:
getQueues
public List
Retrieves the list of queues present in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities.
Parameters:
Returns:
Throws:
getRule
public RuleDescription getRule(String topicPath, String subscriptionName, String ruleName)
Retrieves a rule for a given topic and subscription from the service namespace
Parameters:
Returns:
Throws:
getRules
public List
Retrieves the list of rules for a given topic-subscription in the namespace.
Parameters:
Returns:
Throws:
getRules
public List
Retrieves the list of rules for a given topic-subscription in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities.
Parameters:
Returns:
Throws:
getSubscription
public SubscriptionDescription getSubscription(String topicPath, String subscriptionName)
Retrieves a subscription for a given topic from the service namespace
Parameters:
Returns:
Throws:
getSubscriptionRuntimeInfo
public SubscriptionRuntimeInfo getSubscriptionRuntimeInfo(String topicPath, String subscriptionName)
Retrieves the runtime information of a subscription in a given topic
Parameters:
Returns:
Throws:
getSubscriptions
public List
Retrieves the list of subscriptions for a given topic in the namespace.
Parameters:
Returns:
Throws:
getSubscriptions
public List
Retrieves the list of subscriptions for a given topic in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities.
Parameters:
Returns:
Throws:
getTopic
public TopicDescription getTopic(String path)
Retrieves a topic from the service namespace
Parameters:
Returns:
Throws:
getTopicRuntimeInfo
public TopicRuntimeInfo getTopicRuntimeInfo(String path)
Retrieves the runtime information of a topic
Parameters:
Returns:
Throws:
getTopics
public List
Retrieves the list of topics present in the namespace.
Returns:
Throws:
getTopics
public List
Retrieves the list of topics present in the namespace. You can simulate pages of list of entities by manipulating count and skip parameters. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities.
Parameters:
Returns:
Throws:
queueExists
public Boolean queueExists(String path)
Checks whether a given queue exists or not.
Parameters:
Returns:
Throws:
ruleExists
public Boolean ruleExists(String topicPath, String subscriptionName, String ruleName)
Checks whether a given rule exists or not for a given subscription.
Parameters:
Returns:
Throws:
subscriptionExists
public Boolean subscriptionExists(String topicPath, String subscriptionName)
Checks whether a given subscription exists or not.
Parameters:
Returns:
Throws:
topicExists
public Boolean topicExists(String path)
Checks whether a given topic exists or not.
Parameters:
Returns:
Throws:
updateQueue
public QueueDescription updateQueue(QueueDescription queueDescription)
Updates an existing queue.
Parameters:
Returns:
QueueDescription of the updated queue.
Throws:
updateRule
public RuleDescription updateRule(String topicName, String subscriptionName, RuleDescription ruleDescription)
Updates an existing rule.
Parameters:
Returns:
RuleDescription of the updated rule.
Throws:
updateSubscription
public SubscriptionDescription updateSubscription(SubscriptionDescription subscriptionDescription)
Updates an existing subscription.
Parameters:
Returns:
SubscriptionDescription of the updated subscription.
Throws:
updateTopic
public TopicDescription updateTopic(TopicDescription topicDescription)
Updates an existing topic.
Parameters:
Returns:
TopicDescription of the updated topic.
Throws:
Applies to
Azure SDK for Java