Package jade.core
Class NodeDescriptor
- java.lang.Object
-
- jade.core.NodeDescriptor
-
- All Implemented Interfaces:
Serializable,Serializable
public class NodeDescriptor extends Object implements Serializable
TheNodeDescriptorclass serves as a meta-level description of a kernel-level service. Instances of this class contain aNodeobject, 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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerIDgetContainer()Retrieve the ID of the container (if any) hosted by the described node.StringgetName()Retrieve the name (if any) of the described node.NodegetNode()Retrieve the described node.CredentialsgetOwnerCredentials()Retrieve the credentials of the owner of this node (if any)JADEPrincipalgetOwnerPrincipal()Retrieve the principal of the owner of this node (if any)NodegetParentNode()byte[]getPassword()Retrieve the password of the owner of the described nodeJADEPrincipalgetPrincipal()Retrieve the principal of the described nodeStringgetUsername()Retrieve the username of the owner of the described nodevoidsetName(String nn)Change the name (if any) of the described node.voidsetNode(Node node)Change the described node (if any).voidsetOwnerCredentials(Credentials credentials)Set the credentials of the owner of this nodevoidsetOwnerPrincipal(JADEPrincipal principal)Set the principal of the owner of this nodevoidsetParentNode(Node n)voidsetPassword(byte[] password)Set the password of the owner of the described nodevoidsetPrincipal(JADEPrincipal principal)Set the principal of the described nodevoidsetUsername(String username)Set the username of the owner of the described node
-
-
-
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 describedNodeobject.
-
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 describedNodeobject.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(String nn)
Change the name (if any) of the described node.- Parameters:
nn- The name to assign to the described node.
-
getName
public String getName()
Retrieve the name (if any) of the described node.- Returns:
- The name of the described node, or
nullif no name was set.
-
setNode
public void setNode(Node node)
Change the described node (if any).- Parameters:
node- TheNodeobject that is to be described by this node descriptor.
-
getNode
public Node getNode()
Retrieve the described node.- Returns:
- The
Nodeobject described by this node descriptor, ornullif no node was set.
-
getContainer
public ContainerID getContainer()
Retrieve the ID of the container (if any) hosted by the described node.- Returns:
- The
ContainerIDof the hosted container, ornullif no such container was set.
-
setParentNode
public void setParentNode(Node n)
-
getParentNode
public Node getParentNode()
-
setUsername
public void setUsername(String username)
Set the username of the owner of the described node
-
getUsername
public 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(JADEPrincipal principal)
Set the principal of the described node
-
getPrincipal
public JADEPrincipal getPrincipal()
Retrieve the principal of the described node
-
setOwnerPrincipal
public void setOwnerPrincipal(JADEPrincipal principal)
Set the principal of the owner of this node
-
getOwnerPrincipal
public JADEPrincipal getOwnerPrincipal()
Retrieve the principal of the owner of this node (if any)- Returns:
- The principal of the owner of this node, or
nullif no principal was set.
-
setOwnerCredentials
public void setOwnerCredentials(Credentials credentials)
Set the credentials of the owner of this node
-
getOwnerCredentials
public Credentials getOwnerCredentials()
Retrieve the credentials of the owner of this node (if any)- Returns:
- The credentials of the owner of this node, or
nullif no credentials were set.
-
-