public interface ResourceManager
ResourceManager is to provide a unified interface of resource management,
allowing developers to manage the namespace, queue and routing resources.
Create, set, get and delete are the four basic operations of ResourceManager.
ResourceManager also supports dynamic fetch and update of resource attributes.
MessagingAccessPoint.resourceManager() ()} is the unique method to obtain a ResourceManager
instance. Changes made through this instance will immediately apply to the message-oriented middleware (MOM) behind
MessagingAccessPoint.
| Modifier and Type | Method and Description |
|---|---|
void |
createNamespace(String nsName,
KeyValue attributes)
Creates a
Namespace resource with some preset attributes. |
void |
createQueue(String queueName,
KeyValue attributes)
Creates a
Queue resource in the configured namespace with some preset attributes. |
void |
createRouting(String routingName,
KeyValue attributes)
Creates a
Routing resource in the configured namespace with some preset attributes. |
void |
deleteNamespace(String nsName)
Deletes an existing namespace resource.
|
void |
deleteQueue(String queueName)
Deletes an existing queue resource.
|
void |
deleteRouting(String routingName)
Deletes an existing routing resource.
|
KeyValue |
getNamespaceAttributes(String nsName)
Gets the attributes of the specific namespace.
|
KeyValue |
getQueueAttributes(String queueName)
Gets the attributes of the specified queue.
|
KeyValue |
getRoutingAttributes(String routingName)
Gets the attributes of the specified routing.
|
List<String> |
listNamespaces()
Gets the namespace list in the current
MessagingAccessPoint. |
List<String> |
listQueues(String nsName)
Gets the queue list in the specific namespace.
|
List<String> |
listRoutings(String nsName)
Gets the routing list in the specific namespace.
|
List<String> |
listStreams(String queueName)
Gets the stream list behind the specified queue.
|
void |
setNamespaceAttributes(String nsName,
KeyValue attributes)
Sets the attributes of the specific namespace, the old attributes will be replaced
by the provided attributes, only the provided key will be updated.
|
void |
setQueueAttributes(String queueName,
KeyValue attributes)
Sets the attributes of the specified queue, the old attributes will be replaced
by the provided attributes, only the provided key will be updated.
|
void |
setRoutingAttributes(String routingName,
KeyValue attributes)
Sets the attributes of the specified routing, the old attributes will be replaced
by the provided attributes, only the provided key will be updated.
|
void |
updateMessage(String queueName,
String messageId,
KeyValue headers)
Updates some system headers of a message in the configured namespace.
|
void createNamespace(String nsName, KeyValue attributes)
Namespace resource with some preset attributes.
A namespace wraps the OMS resources in an abstract concept that makes it appear to the users within the namespace that they have their own isolated instance of the global OMS resources.
nsName - the name of the new namespaceattributes - the preset attributesvoid setNamespaceAttributes(String nsName, KeyValue attributes) throws OMSResourceNotExistException
nsName - the specific namespaceattributes - the new attributesOMSResourceNotExistException - if the specific namespace does not existKeyValue getNamespaceAttributes(String nsName) throws OMSResourceNotExistException
nsName - the specific namespaceOMSResourceNotExistException - if the specific namespace does not existvoid deleteNamespace(String nsName) throws OMSResourceNotExistException
nsName - the namespace needs to be deletedOMSResourceNotExistException - if the specified namespace does not existList<String> listNamespaces()
MessagingAccessPoint.void createQueue(String queueName, KeyValue attributes) throws OMSResourceNotExistException
Queue resource in the configured namespace with some preset attributes.
The standard OMS Queue schema must start with the Namespace prefix:
<namespace_name>://<queue_name>
queueName - the name of the new queueattributes - the preset attributesOMSResourceNotExistException - if the configured namespace does not exist or specified queue name is
not availablevoid setQueueAttributes(String queueName, KeyValue attributes) throws OMSResourceNotExistException
queueName - the queue nameattributes - the new attributesOMSResourceNotExistException - if the specified queue or namespace does not existKeyValue getQueueAttributes(String queueName) throws OMSResourceNotExistException
queueName - the queue nameOMSResourceNotExistException - if the specified queue or namespace does not existvoid deleteQueue(String queueName) throws OMSResourceNotExistException
queueName - the queue needs to be deletedOMSResourceNotExistException - if the specified queue or namespace does not existList<String> listQueues(String nsName) throws OMSResourceNotExistException
nsName - the specific namespaceOMSResourceNotExistException - if the specific namespace does not existvoid createRouting(String routingName, KeyValue attributes) throws OMSResourceNotExistException
Routing resource in the configured namespace with some preset attributes.
The standard OMS Routing schema must start with the Namespace prefix:
<namespace_name>://<routing_name>
routingName - the name of the new routingattributes - the preset attributesOMSResourceNotExistException - if the configured namespace does not exist or specified routing name is not
availablevoid setRoutingAttributes(String routingName, KeyValue attributes) throws OMSResourceNotExistException
routingName - the routing nameattributes - the new attributesOMSResourceNotExistException - if the specified routing or namespace does not existKeyValue getRoutingAttributes(String routingName) throws OMSResourceNotExistException
routingName - the routing nameOMSResourceNotExistException - if the specified routing or namespace does not existvoid deleteRouting(String routingName) throws OMSResourceNotExistException
routingName - the routing needs to be deletedOMSResourceNotExistException - if the specified routing or namespace does not existList<String> listRoutings(String nsName) throws OMSResourceNotExistException
nsName - the specific namespaceOMSResourceNotExistException - if the specific namespace does not existList<String> listStreams(String queueName) throws OMSResourceNotExistException
queueName - the queue nameOMSResourceNotExistException - if the specified queue or namespace does not existvoid updateMessage(String queueName, String messageId, KeyValue headers) throws OMSResourceNotExistException
Below system headers are allowed to be changed dynamically:
queueName - the specific queue the message resides inmessageId - the id of messageheaders - the new headersOMSResourceNotExistException - if the specified queue, namespace or message does not existCopyright © 2017–2018 OpenMessaging. All rights reserved.