TPTP 4.4.0 Platform Project
Public API Specification

org.eclipse.hyades.execution.local.control
Class NodeFactory

java.lang.Object
  extended byorg.eclipse.hyades.execution.local.control.NodeFactory

public class NodeFactory
extends java.lang.Object

A factory for creating Nodes. Nodes can be specified by either name or InetAddress. Each Node is treated as a singleton and attempts to create a Node that already exists will return the same Node instance that already existed.


Constructor Summary
NodeFactory()
           
 
Method Summary
static void addNode(Node node)
           
static Node createNode(java.net.InetAddress address)
          Create a Node for the suplied InetAddress.
static Node createNode(java.net.InetAddress address, java.security.Principal principal)
           
static Node createNode(java.lang.String hostname)
          Create a Node for the suplied hostname.
static Node createNode(java.lang.String hostname, java.security.Principal principal)
           
static Node getLocalHost()
          Deprecated. - use getLocalHost(User user)
static Node getLocalHost(java.security.Principal principal)
           
static Node getNode(java.net.InetAddress addr)
          Searches the Node list based upon the InetAddress.
static Node getNode(java.net.InetAddress addr, java.security.Principal principal)
           
static Node getNode(java.lang.String name, java.security.Principal principal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeFactory

public NodeFactory()
Method Detail

createNode

public static Node createNode(java.lang.String hostname)
                       throws java.net.UnknownHostException
Create a Node for the suplied hostname. Nodes are are intended to be singletons in this application so if the Node exists it will be returned.

Throws:
java.net.UnknownHostException

createNode

public static Node createNode(java.lang.String hostname,
                              java.security.Principal principal)
                       throws java.net.UnknownHostException,
                              DuplicateUserException
Throws:
java.net.UnknownHostException
DuplicateUserException

createNode

public static Node createNode(java.net.InetAddress address)
                       throws java.net.UnknownHostException
Create a Node for the suplied InetAddress. Nodes are are intended to be singletons in this application so if the Node exists it will be returned.

Throws:
java.net.UnknownHostException

createNode

public static Node createNode(java.net.InetAddress address,
                              java.security.Principal principal)
                       throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

getLocalHost

public static Node getLocalHost()
                         throws java.net.UnknownHostException
Deprecated. - use getLocalHost(User user)

Returns the node that represents the local host.

Throws:
java.net.UnknownHostException

getLocalHost

public static Node getLocalHost(java.security.Principal principal)
                         throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

addNode

public static void addNode(Node node)

getNode

public static Node getNode(java.net.InetAddress addr)
Searches the Node list based upon the InetAddress.

Returns:
the Node if it exists, null otherwise.

getNode

public static Node getNode(java.net.InetAddress addr,
                           java.security.Principal principal)

getNode

public static Node getNode(java.lang.String name,
                           java.security.Principal principal)
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

TPTP 4.4.0 Platform Project
Public API Specification