public class AndesAdminService
extends org.wso2.carbon.core.AbstractAdmin
| Modifier and Type | Class and Description |
|---|---|
class |
AndesAdminService.CustomQueueComparator
A comparator class to order queues.
|
class |
AndesAdminService.CustomSubscriptionComparator
A comparator class to order subscriptions.
|
| Constructor and Description |
|---|
AndesAdminService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addQueueAndAssignPermission(String queueName,
QueueRolePermission[] queueRolePermissionsDTO)
Add a queue with the given name and assign permissions
|
Message[] |
browseQueue(String queueName,
long nextMessageIdToRead,
int maxMsgCount)
Browse the given queue name by start index and max messages count
|
boolean |
checkCurrentUserHasAddQueuePermission()
Check if current user has add permission.
|
boolean |
checkCurrentUserHasBrowseMessagesInDLCPermission()
Check if current user has browse messages in dlc permission.
|
boolean |
checkCurrentUserHasBrowseQueuePermission()
Check if current user has browse permission.
|
boolean |
checkCurrentUserHasDeleteMessagesInDLCPermission()
Check if current user has delete messages in dlc permission.
|
boolean |
checkCurrentUserHasDeleteQueuePermission()
Check if current user has delete permission.
|
boolean |
checkCurrentUserHasPublishPermission(String queueName)
Check if current user is has publish permission for a queue.
|
boolean |
checkCurrentUserHasPurgeQueuePermission()
Check if current user has purge permission.
|
boolean |
checkCurrentUserHasQueueSubscriptionClosePermission()
Evaluate current logged in user has close subscription permission for queue subscriptions .
|
boolean |
checkCurrentUserHasRerouteMessagesInDLCPermission()
Check if current user has reroute messages in dlc permission.
|
boolean |
checkCurrentUserHasRestoreMessagesInDLCPermission()
Check if current user has restore messages in dlc permission.
|
boolean |
checkCurrentUserHasTopicSubscriptionClosePermission()
Evaluate current logged in user has close subscription permission for topic subscriptions.
|
boolean |
checkUserHasAddQueuePermission(String username)
Check if given user has add permission.
|
boolean |
checkUserHasBrowseMessagesInDLCPermission(String username)
Check if given user has browse messages in dlc permission.
|
boolean |
checkUserHasBrowseQueuePermission(String username)
Check if given user has browse permission.
|
boolean |
checkUserHasDeleteMessagesInDLCPermission(String username)
Check if given user has delete messages in dlc permission.
|
boolean |
checkUserHasDeleteQueuePermission(String username)
Check if given user has delete permission.
|
boolean |
checkUserHasPublishPermission(String queueName,
String userName)
Check if a user has publishing permission for a queue.
|
boolean |
checkUserHasPurgeQueuePermission(String username)
Check if given user has purge permission.
|
boolean |
checkUserHasRerouteMessagesInDLCPermission(String username)
Check if given user has reroute messages in dlc permission.
|
boolean |
checkUserHasRestoreMessagesInDLCPermission(String username)
Check if given user has restore messages in dlc permission.
|
void |
closeSubscription(String subscriptionID,
String destination)
Close subscription defined by subscription ID forcibly
|
void |
deleteMessagesFromDeadLetterQueue(long[] messageIDs,
String destinationQueueName)
Delete messages from the Dead Letter Queue and delete their content.
|
void |
deleteQueue(String queueName)
Deletes a queue.
|
void |
deleteTopicFromRegistry(String topicName,
String subscriptionId)
Delete topic related resources from registry
|
Subscription[] |
getAllDurableQueueSubscriptions()
Gets all durable queue subscriptions.
|
Subscription[] |
getAllDurableTopicSubscriptions()
Gets all durable topic subscriptions
Suppressing 'MismatchedQueryAndUpdateOfCollection' as 'allSubscriptions' is used to convert
to an array.
|
Subscription[] |
getAllLocalTempQueueSubscriptions()
Gets all local temporary queue subscriptions
Suppressing 'MismatchedQueryAndUpdateOfCollection' as 'allSubscriptions' is used to convert
to an array.
|
Subscription[] |
getAllLocalTempTopicSubscriptions()
Gets all local temporary topic subscriptions.
|
Queue[] |
getAllQueues()
Gets all queues.
|
Subscription[] |
getAllSubscriptions()
Gets all subscriptions.
|
Queue |
getDLCQueue()
Retrieve the DLC queue for the domain
|
long |
getMessageCount(String destinationName,
String msgPattern)
Gets the message count for a queue
Suppressing 'UnusedDeclaration' as it is called by webservice
|
int |
getMessageCountForSubscriber(String subscriptionID,
boolean durable)
Gets the number of messages remaining for a subscriber.
|
Message[] |
getMessageInDLCForQueue(String queueName,
long nextMessageIdToRead,
int maxMsgCount)
Gets the number of messages in DLC fora given queue name by start index and max messages
count
|
long |
getNumberOfMessagesInDLCForQueue(String queueName)
Gets the number of messages in DLC belonging to a specific queue.
|
Queue |
getQueueByName(String queueName)
Retrieve an
Queue with the number of messages remaining in the
database by passing a queue name |
QueueRolePermission[] |
getQueueRolePermission(String queueName)
Get all permission of the given queue name
|
long |
getTotalMessagesInQueue(String queueName)
Total messages in the given queue
|
String[] |
getUserRoles()
Get roles of the current logged user
If user has admin role, then all available roles will be return
|
void |
purgeMessagesOfQueue(String queueName)
Deletes all messages from a queue.
|
void |
restoreMessagesFromDeadLetterQueue(long[] messageIDs,
String destinationQueueName)
Restore messages from the Dead Letter Queue to their original queues.
|
void |
restoreMessagesFromDeadLetterQueueWithDifferentDestination(long[] messageIDs,
String newDestinationQueueName,
String destinationQueueName)
Restore messages from the Dead Letter Queue to another queue in the same tenant.
|
boolean |
sendMessage(String queueName,
String jmsType,
String jmsCorrelationID,
int numberOfMessages,
String message,
int deliveryMode,
int priority,
long expireTime)
Send messages to given queue
|
void |
updatePermission(String queueName,
QueueRolePermission[] queueRolePermissionsDTO)
Update the permission of the given queue name
|
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamppublic Queue getQueueByName(String queueName) throws BrokerManagerAdminException
Queue with the number of messages remaining in the
database by passing a queue namequeueName - name of the queueBrokerManagerAdminExceptionpublic Queue getDLCQueue() throws BrokerManagerAdminException
Queue with the number of messages in the dlcBrokerManagerAdminExceptionpublic Queue[] getAllQueues() throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic long getMessageCount(String destinationName, String msgPattern) throws BrokerManagerAdminException
destinationName - Destination name.msgPattern - Value should be either 'queue' or 'topic'.BrokerManagerAdminExceptionpublic void deleteQueue(String queueName) throws BrokerManagerAdminException
queueName - Queue name.BrokerManagerAdminExceptionpublic void deleteTopicFromRegistry(String topicName, String subscriptionId) throws BrokerManagerAdminException
topicName - Topic NamesubscriptionId - Subscription IDBrokerManagerAdminExceptionpublic void restoreMessagesFromDeadLetterQueue(long[] messageIDs,
String destinationQueueName)
throws BrokerManagerAdminException
messageIDs - Browser Message Id / External Message Id list.destinationQueueName - Dead Letter Queue name for the respective tenant.BrokerManagerAdminExceptionpublic void restoreMessagesFromDeadLetterQueueWithDifferentDestination(long[] messageIDs,
String newDestinationQueueName,
String destinationQueueName)
throws BrokerManagerAdminException
messageIDs - Browser Message Id / External Message Id list.newDestinationQueueName - The new destination queue for the messages in the same tenant.destinationQueueName - Dead Letter Queue name for the respective tenant.BrokerManagerAdminExceptionpublic void deleteMessagesFromDeadLetterQueue(long[] messageIDs,
String destinationQueueName)
throws BrokerManagerAdminException
messageIDs - Browser Message Id / External Message Id list to be deleted.destinationQueueName - Dead Letter Queue name for the respective tenant.BrokerManagerAdminExceptionpublic void purgeMessagesOfQueue(String queueName) throws BrokerManagerAdminException
queueName - Queue name.BrokerManagerAdminExceptionpublic void closeSubscription(String subscriptionID, String destination) throws BrokerManagerAdminException
subscriptionID - ID of the subscriptiondestination - queue / topic name of the subscribed destinationBrokerManagerAdminExceptionpublic Subscription[] getAllSubscriptions() throws BrokerManagerAdminException
Subscription.BrokerManagerAdminExceptionpublic Subscription[] getAllDurableQueueSubscriptions() throws BrokerManagerAdminException
Subscription.BrokerManagerAdminExceptionpublic Subscription[] getAllLocalTempQueueSubscriptions() throws BrokerManagerAdminException
Subscription.BrokerManagerAdminExceptionpublic Subscription[] getAllDurableTopicSubscriptions() throws BrokerManagerAdminException
Subscription.BrokerManagerAdminExceptionpublic Subscription[] getAllLocalTempTopicSubscriptions() throws BrokerManagerAdminException
Subscription.BrokerManagerAdminExceptionpublic long getNumberOfMessagesInDLCForQueue(String queueName) throws BrokerManagerAdminException
queueName - The name of the queue.BrokerManagerAdminExceptionpublic Message[] getMessageInDLCForQueue(String queueName, long nextMessageIdToRead, int maxMsgCount) throws BrokerManagerAdminException
queueName - Name of the queuenextMessageIdToRead - Start point of the queue message id to start readingmaxMsgCount - Maximum messages from start indexMessageBrokerManagerAdminExceptionpublic void updatePermission(String queueName, QueueRolePermission[] queueRolePermissionsDTO) throws BrokerManagerAdminException
queueName - Name of the queuequeueRolePermissionsDTO - A QueueRolePermissionBrokerManagerAdminExceptionpublic void addQueueAndAssignPermission(String queueName, QueueRolePermission[] queueRolePermissionsDTO) throws BrokerManagerAdminException
queueName - Name of the queuequeueRolePermissionsDTO - A QueueRolePermissionBrokerManagerAdminExceptionpublic String[] getUserRoles() throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic QueueRolePermission[] getQueueRolePermission(String queueName) throws BrokerManagerAdminException
queueName - Name of the queueQueueRolePermissionBrokerManagerAdminExceptionpublic Message[] browseQueue(String queueName, long nextMessageIdToRead, int maxMsgCount) throws BrokerManagerAdminException
queueName - Name of the queuenextMessageIdToRead - Start point of the queue message id to start readingmaxMsgCount - Maximum messages from start indexMessageBrokerManagerAdminExceptionpublic long getTotalMessagesInQueue(String queueName) throws BrokerManagerAdminException
queueName - Name of the queueBrokerManagerAdminExceptionpublic boolean sendMessage(String queueName, String jmsType, String jmsCorrelationID, int numberOfMessages, String message, int deliveryMode, int priority, long expireTime) throws BrokerManagerAdminException
queueName - Name of the queuejmsType - JMS TypejmsCorrelationID - JMS Correlation IdnumberOfMessages - Number of timesmessage - Message contentdeliveryMode - Delivery modepriority - Message priorityexpireTime - Message expire timeBrokerManagerAdminExceptionpublic int getMessageCountForSubscriber(String subscriptionID, boolean durable) throws BrokerManagerAdminException
subscriptionID - The subscription ID.durable - Whether the subscription is durable or not.BrokerManagerAdminExceptionpublic boolean checkCurrentUserHasPublishPermission(String queueName) throws BrokerManagerAdminException
queueName - The name of the queueBrokerManagerAdminExceptionpublic boolean checkUserHasPublishPermission(String queueName, String userName) throws BrokerManagerAdminException
queueName - The name of the queueuserName - The username of the userBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasAddQueuePermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasAddQueuePermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasBrowseQueuePermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasBrowseQueuePermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasDeleteQueuePermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasDeleteQueuePermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasPurgeQueuePermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasPurgeQueuePermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasBrowseMessagesInDLCPermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasBrowseMessagesInDLCPermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasDeleteMessagesInDLCPermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasDeleteMessagesInDLCPermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasRestoreMessagesInDLCPermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasRestoreMessagesInDLCPermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasRerouteMessagesInDLCPermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkUserHasRerouteMessagesInDLCPermission(String username) throws BrokerManagerAdminException
username - usernameBrokerManagerAdminExceptionpublic boolean checkCurrentUserHasQueueSubscriptionClosePermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionpublic boolean checkCurrentUserHasTopicSubscriptionClosePermission()
throws BrokerManagerAdminException
BrokerManagerAdminExceptionCopyright © 2015 WSO2. All rights reserved.