com.goldenhammer.nodecontroller
Class SimulationController

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended bycom.goldenhammer.nodecontroller.SimulationController
All Implemented Interfaces:
Controller, java.rmi.Remote, java.io.Serializable

public class SimulationController
extends java.rmi.server.UnicastRemoteObject
implements Controller

This class represents the controller which actually runs the simulation. This class is labeled as a server because the individual nodes connect to this so that they may be run from a central location ie: the control console where this server will be running

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
SimulationController()
          default constructor
 
Method Summary
 ModalityStatsSummary getGigPerHRForEntireSystem(java.lang.String testID)
           
 java.util.Collection getGigPerHRPerModality(java.lang.String testID)
           
 java.util.Collection getGigPerHRPerModalityType(java.lang.String testID)
           
 java.util.Collection getNodes()
          gets all the nodes this controller currently owns
 java.util.Collection getSimulationStatus()
          Gets the status of the simulation
 java.util.Collection getSummariesForNode(java.lang.String testID)
           
 java.lang.String getTestid()
           
 void markDistributed()
          increments the counter for how many modalities have been distributed
 void markRetrieved(Node node)
          increments the counter for how many nodes have been recieved
 void startSimulation(java.lang.String profileName, java.util.Collection modalities)
          called when the simulation needs to be run.
 void stopSimulation()
          tells each connected node to stop its respective modalities
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimulationController

public SimulationController()
                     throws java.rmi.RemoteException
default constructor

Throws:
java.rmi.RemoteException
Method Detail

startSimulation

public void startSimulation(java.lang.String profileName,
                            java.util.Collection modalities)
                     throws java.rmi.RemoteException
Description copied from interface: Controller
called when the simulation needs to be run. It starts each individual node (ie: machine within the network)

Specified by:
startSimulation in interface Controller
Parameters:
profileName -
Throws:
java.rmi.RemoteException

stopSimulation

public void stopSimulation()
                    throws java.rmi.RemoteException
Description copied from interface: Controller
tells each connected node to stop its respective modalities

Specified by:
stopSimulation in interface Controller
Throws:
java.rmi.RemoteException

getNodes

public java.util.Collection getNodes()
                              throws java.rmi.RemoteException
Description copied from interface: Controller
gets all the nodes this controller currently owns

Specified by:
getNodes in interface Controller
Returns:
- a collection of all nodes
Throws:
java.rmi.RemoteException

markRetrieved

public void markRetrieved(Node node)
                   throws java.rmi.RemoteException
Description copied from interface: Controller
increments the counter for how many nodes have been recieved

Specified by:
markRetrieved in interface Controller
Parameters:
node -
Throws:
java.rmi.RemoteException

markDistributed

public void markDistributed()
                     throws java.rmi.RemoteException
Description copied from interface: Controller
increments the counter for how many modalities have been distributed

Specified by:
markDistributed in interface Controller
Throws:
java.rmi.RemoteException

getSimulationStatus

public java.util.Collection getSimulationStatus()
                                         throws java.rmi.RemoteException
Description copied from interface: Controller
Gets the status of the simulation

Specified by:
getSimulationStatus in interface Controller
Returns:
a Collection of ModalityStatus objects that give the name and percentage complete of each Modality from each Node
Throws:
java.rmi.RemoteException

getTestid

public java.lang.String getTestid()
Returns:

getGigPerHRForEntireSystem

public ModalityStatsSummary getGigPerHRForEntireSystem(java.lang.String testID)
                                                throws java.rmi.RemoteException
Specified by:
getGigPerHRForEntireSystem in interface Controller
Parameters:
testID -
Returns:
Throws:
java.rmi.RemoteException

getGigPerHRPerModality

public java.util.Collection getGigPerHRPerModality(java.lang.String testID)
                                            throws java.rmi.RemoteException
Specified by:
getGigPerHRPerModality in interface Controller
Parameters:
testID -
Returns:
Throws:
java.rmi.RemoteException

getGigPerHRPerModalityType

public java.util.Collection getGigPerHRPerModalityType(java.lang.String testID)
                                                throws java.rmi.RemoteException
Specified by:
getGigPerHRPerModalityType in interface Controller
Parameters:
testID -
Returns:
Throws:
java.rmi.RemoteException

getSummariesForNode

public java.util.Collection getSummariesForNode(java.lang.String testID)
                                         throws java.rmi.RemoteException
Specified by:
getSummariesForNode in interface Controller
Parameters:
testID -
Returns:
Throws:
java.rmi.RemoteException