Package jade.core

Class NodeDescriptor

  • All Implemented Interfaces:
    Serializable, Serializable

    public class NodeDescriptor
    extends 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 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.
    • 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 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​(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 null if 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 null if no credentials were set.