com.goldenhammer.nodecontroller.thread
Class NodeRetriever

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.goldenhammer.nodecontroller.thread.NodeRetriever
All Implemented Interfaces:
java.lang.Runnable

public class NodeRetriever
extends java.lang.Thread

This Thread's only job is to connect to the specified rmi registry and retrieve the specified node


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
NodeRetriever(java.lang.String ip, java.lang.String port, java.lang.String name, Controller cont)
          Constructor - this is the only constructor that should be called on this thread.
 
Method Summary
 java.lang.Object getIP()
          get the address of the rmi registry which this retriever will get the node from
 Node getNode()
          get the node which has been retrieved from the remote registry
 java.lang.Object getNodeName()
          get the name of the remote node which this retriever will get
 java.lang.Object getPort()
          get the port of the rmi registry which this retriever will get the node from
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeRetriever

public NodeRetriever(java.lang.String ip,
                     java.lang.String port,
                     java.lang.String name,
                     Controller cont)
              throws java.security.InvalidParameterException
Constructor - this is the only constructor that should be called on this thread. if this thread is not provided an address, port & node name it will not work properly

Parameters:
ip - - the address of the rmi registry from which to get the node
port - - the port of the rmi registry from which to get the node
Throws:
java.security.InvalidParameterException - - if any of the parameters are null or ""
Method Detail

run

public void run()

getIP

public java.lang.Object getIP()
get the address of the rmi registry which this retriever will get the node from

Returns:
- the address of the remote registry

getPort

public java.lang.Object getPort()
get the port of the rmi registry which this retriever will get the node from

Returns:
- the port of the remote registry

getNodeName

public java.lang.Object getNodeName()
get the name of the remote node which this retriever will get

Returns:
- the name of the remote node

getNode

public Node getNode()
get the node which has been retrieved from the remote registry

Returns:
- the node. only not null after this thread has been run