jade.core
Class NodeDescriptor

java.lang.Object
  extended by jade.core.NodeDescriptor
All Implemented Interfaces:
java.io.Serializable

public class NodeDescriptor
extends java.lang.Object
implements Serializable

The NodeDescriptor class serves as a meta-level description of a kernel-level service. Instances of this class contain a Node object, along with its name and properties, and are used in service management operations, as well as in agent-level introspection of platform-level entities.

Author:
Giovanni Rimassa - FRAMeTech s.r.l.
See Also:
Node, Serialized Form

Constructor Summary
NodeDescriptor()
          Builds an uninitialized node descriptor.
NodeDescriptor(ContainerID cid, Node node)
          Builds a node descriptor for a node hosting an agent container.
NodeDescriptor(Node node)
          Builds a new node descriptor, describing the given node with the given name and properties.
 
Method Summary
 ContainerID getContainer()
          Retrieve the ID of the container (if any) hosted by the described node.
 java.lang.String getName()
          Retrieve the name (if any) of the described node.
 Node getNode()
          Retrieve the described node.
 jade.security.Credentials getOwnerCredentials()
          Retrieve the credentials of the owner of this node (if any)
 jade.security.JADEPrincipal getOwnerPrincipal()
          Retrieve the principal of the owner of this node (if any)
 Node getParentNode()
           
 byte[] getPassword()
          Retrieve the password of the owner of the described node
 jade.security.JADEPrincipal getPrincipal()
          Retrieve the principal of the described node
 java.lang.String getUsername()
          Retrieve the username of the owner of the described node
 void setName(java.lang.String nn)
          Change the name (if any) of the described node.
 void setNode(Node node)
          Change the described node (if any).
 void setOwnerCredentials(jade.security.Credentials credentials)
          Set the credentials of the owner of this node
 void setOwnerPrincipal(jade.security.JADEPrincipal principal)
          Set the principal of the owner of this node
 void setParentNode(Node n)
           
 void setPassword(byte[] password)
          Set the password of the owner of the described node
 void setPrincipal(jade.security.JADEPrincipal principal)
          Set the principal of the described node
 void setUsername(java.lang.String username)
          Set the username of the owner of the described node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeDescriptor

public NodeDescriptor(Node node)
Builds a new node descriptor, describing the given node with the given name and properties.

Parameters:
nn - The name of the described node.
node - The described Node object.

NodeDescriptor

public NodeDescriptor(ContainerID cid,
                      Node node)
Builds a node descriptor for a node hosting an agent container.

Parameters:
cid - The container ID for the hosted container.
node - The described Node object.
principal - The principal of the node owner.
credentials - The credentials of the node owner.

NodeDescriptor

public NodeDescriptor()
Builds an uninitialized node descriptor.

See Also:
setName(String sn), setNode(Node node)
Method Detail

setName

public void setName(java.lang.String nn)
Change the name (if any) of the described node.

Parameters:
nn - The name to assign to the described node.

getName

public java.lang.String getName()
Retrieve the name (if any) of the described node.

Returns:
The name of the described node, or null if no name was set.

setNode

public void setNode(Node node)
Change the described node (if any).

Parameters:
node - The Node object that is to be described by this node descriptor.

getNode

public Node getNode()
Retrieve the described node.

Returns:
The Node object described by this node descriptor, or null if no node was set.

getContainer

public ContainerID getContainer()
Retrieve the ID of the container (if any) hosted by the described node.

Returns:
The ContainerID of the hosted container, or null if no such container was set.

setParentNode

public void setParentNode(Node n)

getParentNode

public Node getParentNode()

setUsername

public void setUsername(java.lang.String username)
Set the username of the owner of the described node


getUsername

public java.lang.String getUsername()
Retrieve the username of the owner of the described node


setPassword

public void setPassword(byte[] password)
Set the password of the owner of the described node


getPassword

public byte[] getPassword()
Retrieve the password of the owner of the described node


setPrincipal

public void setPrincipal(jade.security.JADEPrincipal principal)
Set the principal of the described node


getPrincipal

public jade.security.JADEPrincipal getPrincipal()
Retrieve the principal of the described node


setOwnerPrincipal

public void setOwnerPrincipal(jade.security.JADEPrincipal principal)
Set the principal of the owner of this node


getOwnerPrincipal

public jade.security.JADEPrincipal getOwnerPrincipal()
Retrieve the principal of the owner of this node (if any)

Returns:
The principal of the owner of this node, or null if no principal was set.

setOwnerCredentials

public void setOwnerCredentials(jade.security.Credentials credentials)
Set the credentials of the owner of this node


getOwnerCredentials

public jade.security.Credentials getOwnerCredentials()
Retrieve the credentials of the owner of this node (if any)

Returns:
The credentials of the owner of this node, or null if no credentials were set.