Class RegistryClient
java.lang.Object
org.wso2.carbon.andes.commons.registry.RegistryClient
This class wraps Registry API for the Andes component
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateQueue(String queueName, String owner) Create an entry for a queue in the Registrystatic voidcreateSubscription(String topic, String subscriptionName, String owner) Create an entry for a topic subscription in the Registrystatic voiddeleteQueue(String queueName) Delete the entry for a queue from the Registrystatic voiddeleteSubscription(String topic, String subscriptionName) Delete the entry for a subscription from the Registrystatic QueueDetails[]Get queues saved in the Registrystatic SubscriptionDetails[]getSubscriptions(String topic) Get subscriptions saved in the Registrystatic StringgetTenantBasedTopicName(String topicName) Gets tenant based topic namestatic booleanisResourceExist(String resourceId) Check whether given resource exist in registry
-
Constructor Details
-
RegistryClient
public RegistryClient()
-
-
Method Details
-
createQueue
Create an entry for a queue in the Registry- Parameters:
queueName- Name of the queueowner- Who creates the queue- Throws:
RegistryClientException
-
deleteQueue
Delete the entry for a queue from the Registry- Parameters:
queueName- Name of the queue to be deleted- Throws:
RegistryClientException
-
getQueues
Get queues saved in the Registry- Returns:
- Array of queues
- Throws:
RegistryClientException
-
createSubscription
public static void createSubscription(String topic, String subscriptionName, String owner) throws RegistryClientException Create an entry for a topic subscription in the Registry- Parameters:
topic- Topic namesubscriptionName- Queue name used for the subscriptionowner- Who creates the subscription- Throws:
RegistryClientException
-
getTenantBasedTopicName
Gets tenant based topic name- Parameters:
topicName- the topic name- Returns:
- tenant based topic name
-
deleteSubscription
public static void deleteSubscription(String topic, String subscriptionName) throws RegistryClientException Delete the entry for a subscription from the Registry- Parameters:
topic- Name of the topic that the subscription is made tosubscriptionName- Name of the queue used for the subscription- Throws:
RegistryClientException
-
getSubscriptions
Get subscriptions saved in the Registry- Parameters:
topic- Name of the topic- Returns:
- Array of subscriptions
- Throws:
RegistryClientException
-
isResourceExist
Check whether given resource exist in registry- Parameters:
resourceId- resource path to check- Returns:
- is exist
- Throws:
RegistryClientException
-