com.goldenhammer.node
Interface Node

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
SimulationNode, SimulationNode_Stub

public interface Node
extends java.rmi.Remote

This interface is what must be implemented in order for the remote Node to work as designed


Method Summary
 void addModality(Modality modality)
           
 void endSimulation()
          This method is similar to a finalize in taht it will do whatever is necissary to 'clean up' after the simulation.
 java.util.Collection getStatus()
          Gets from the node an ArrayList of ModalityStatus objects that contain information about the current status of each modality on this node
 ModalityStatsSummary getSummaryForNode(java.lang.String testID)
           
 java.lang.String getTestID()
           
 void markCompleted(SimulationThread thread)
          notify the node that the modality is finished
 void nuke()
           
 void startSimulation(java.lang.String testID)
          starts the simulation.
 void stopSimulation()
          stops this node (kills every modality thread)
 

Method Detail

startSimulation

public void startSimulation(java.lang.String testID)
                     throws java.rmi.RemoteException
starts the simulation. this is called by the controller machine. Before this method is called the node should have created at least one modality for it to run

Parameters:
testID -
Throws:
java.rmi.RemoteException

endSimulation

public void endSimulation()
                   throws java.rmi.RemoteException
This method is similar to a finalize in taht it will do whatever is necissary to 'clean up' after the simulation. It is called by the controller AFTER the controller has determined all modalities/nodes haves completed. **NOTE** this is different than stopSimulation which stops execution

Throws:
java.rmi.RemoteException

markCompleted

public void markCompleted(SimulationThread thread)
                   throws java.rmi.RemoteException
notify the node that the modality is finished

Parameters:
thread -
Throws:
java.rmi.RemoteException

stopSimulation

public void stopSimulation()
                    throws java.rmi.RemoteException
stops this node (kills every modality thread)

Throws:
java.rmi.RemoteException

addModality

public void addModality(Modality modality)
                 throws java.rmi.RemoteException
Parameters:
modality -
Throws:
java.rmi.RemoteException

getStatus

public java.util.Collection getStatus()
                               throws java.rmi.RemoteException
Gets from the node an ArrayList of ModalityStatus objects that contain information about the current status of each modality on this node

Returns:
An ArrayList of ModalityStatus objects
Throws:
java.rmi.RemoteException

nuke

public void nuke()
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getTestID

public java.lang.String getTestID()
                           throws java.rmi.RemoteException
Returns:
Throws:
java.rmi.RemoteException

getSummaryForNode

public ModalityStatsSummary getSummaryForNode(java.lang.String testID)
                                       throws java.rmi.RemoteException
Parameters:
testID -
Returns:
Throws:
java.rmi.RemoteException