|
The nServiceNode represents a Nirvana P2P
service. The nServiceNode objects are generally stored
under the root realm node. They can be obtained by a
number of methods Firstly, by an enumeration of all
child nodes from a realm node.
public void searchNodes(nContainer container)
{
Enumeration children = container.getNodes();
while (children.hasMoreElements()) {
nNode child = (nNode)children.nextElement();
if (child instanceof nServiceNode) {
nServiceNode service = (nServiceNode)child;
System.out.println("Found Service
: "+service.getName());
}
}
}
Or, directly from the realm node by calling :
Vector services = realm.getServicesList();
Each nServiceNode will have a parent which is an instance
of nContainer, however this is also an instance of an
nRealmNode (i.e. the namespace root), since services
do not contain any folder information in it's name.
As services are created, they are added to the nRealmNode's
tree structure as nServiceNodes. This is all managed
for you and does not require you to modify the structure.
However it is possible to be notified when changes to
the namespace occur so that your application can handle
it as you see fit. This is discussed in more detail
in the Management Information section of this guide.
Associated with each service node, is an nServiceInfo
object that describes the details of each service node.
Each service node also has an associated nACL object
that can be modified to change security permissions
for users. This is discussed in more detail in the security
section of this guide.
For more information on the Nirvana Administration,
please see the API
documentation, and the administrator
guide.
|