Dynamic Apps Platform : Universal Messaging Administration Guide : Universal Messaging Administration API : Namespace Objects : nRealmNode
Universal Messaging's namespace contains objects that can be administered, monitored and configured. The nRealmNode object in the nAdminAPI, corresponds to a Universal Messaging Realm server process. The nRealmNode is used to make an admin connection to a realm.
In order to connect to a realm you need to ensure you are familiar with the concept of an RNAME. Once you have the RNAME that corresponds to your realm, you can then construct the nRealmNode and connect to the corresponding realm. This is achieved by the following calls:
String[] RNAME={"nsp://"};

nSessionAttributes nsa=new nSessionAttributes(RNAME);

nRealmNode realm = new nRealmNode(nsa);

std::string rName = "nsp://";

nSessionAttributes* nsa=new nSessionAttributes(rName);

nRealmNode* realm = new nRealmNode(nsa);
By constructing an nRealmNode, and connecting to a realm, the realm node will automatically begin receiving status information from the realm periodically, as well as when things occur.
The nRealmNode is the root of a Universal Messaging Realm's namespace, which is a tree like structure that contains child nodes. The tree nodes are all subclasses of a base class nNode. Each node corresponds to one of the following node subclasses:
*nRealmNode - other realm nodes that have been added to this realm's namespace
*nContainer - folders, if there was a channel called /eur/uk/rates, there would be a child nContainer node called, 'eur' which would have a child called 'uk' etc.
*nLeafNode - these correspond to channels and queues
The nRealmNode itself is a subclass of the nContainer class. To obtain an enumeration of all child nodes within a realm node, simply call the following:
Enumeration children = realm.getNodes();
System.Collections.IEnumerator children = realm.getNodes();
fSortedList nodes = pNode->getNodes();
Once you have this enumeration of nodes, you can then perform the various operations on those nodes available through the nAdminAPI.
If you know the name of the child node you wish to obtain a reference to, you can use the following method:
nNode found = realm.findNode("/eur/uk/rates");
nNode* found = realm->findNode("/eur/uk/rates");
Which should return you an nLeafNode that corresponds to the channel called '/eur/uk/rates'.
As well as obtaining references to existing nodes, it is also possible to create and delete channels and queues using the nRealmNode. For example, to create a channel called '/eur/fr/rates', we would write the following code:
nChannelAttributes cattrib = new nChannelAttributes();
nLeafNode channel = realm.createChannel(cattrib);
nChannelAttributes* cattrib = new nChannelAttributes();
nLeafNode* channel = realm->createChannel(cattrib);
To remove channel or a queue, you can simply call the following method on your realm node (using the channel created above):
For more information on Universal Messaging Administration, please see the API documentation, and the Enterprise Manager Guide.
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback