More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.internal
Class sandStormMgr

java.lang.Object
  |
  +--seda.sandStorm.internal.sandStormMgr
All Implemented Interfaces:
ManagerIF, sandStormConst, SystemManagerIF

public class sandStormMgr
extends java.lang.Object
implements ManagerIF, SystemManagerIF, sandStormConst

This class provides management functionality for the Sandstorm runtime system. It is responsible for initializing the system, creating and registering stages and thread managers, and other administrative functions. Stages and thread managers can interact with this class through the ManagerIF and SystemManagerIF interfaces; this class should not be used directly.

Author:
Matt Welsh
See Also:
ManagerIF, SystemManagerIF

Fields inherited from interface seda.sandStorm.api.ManagerIF
MAINSINK
 
Fields inherited from interface seda.sandStorm.internal.sandStormConst
MAJOR_VERSION, MINOR_VERSION, VERSION_STRING, WELCOME_STRING
 
Constructor Summary
sandStormMgr(SandstormConfig mgrconfig)
          Create a sandStormMgr which reads its configuration from the given file.
 
Method Summary
 void addThreadManager(java.lang.String name, ThreadManagerIF tm)
          Add a thread manager with the given name.
 StageIF createStage(StageWrapperIF wrapper, boolean initialize)
          Create a stage from the given stage wrapper.
 StageIF createStage(java.lang.String stageName, EventHandlerIF evHandler, java.lang.String[] initargs)
          Create a stage with the given name from the given event handler with the given initial arguments.
 SandstormConfig getConfig()
          Return the SandstormConfig used to initialize this manager.
 ProfilerIF getProfiler()
          Return the system profiler.
 SignalMgrIF getSignalMgr()
          Return the system signal manager.
 StageIF getStage(java.lang.String stagename)
          Return a handle to given stage.
 ThreadManagerIF getThreadManager()
          Return the default thread manager.
 ThreadManagerIF getThreadManager(java.lang.String name)
          Return the thread manager with the given name.
 void start()
          Start the manager.
 void stop()
          Stop the manager.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

sandStormMgr

public sandStormMgr(SandstormConfig mgrconfig)
             throws java.lang.Exception
Create a sandStormMgr which reads its configuration from the given file.
Method Detail

start

public void start()
Start the manager.

stop

public void stop()
Stop the manager.

getStage

public StageIF getStage(java.lang.String stagename)
                 throws NoSuchStageException
Return a handle to given stage.
Specified by:
getStage in interface ManagerIF
Following copied from interface: seda.sandStorm.api.ManagerIF
Throws:
NoSuchStageException - Thrown if the stage does not exist.

getThreadManager

public ThreadManagerIF getThreadManager()
Return the default thread manager.
Specified by:
getThreadManager in interface SystemManagerIF

getThreadManager

public ThreadManagerIF getThreadManager(java.lang.String name)
Return the thread manager with the given name.
Specified by:
getThreadManager in interface SystemManagerIF

addThreadManager

public void addThreadManager(java.lang.String name,
                             ThreadManagerIF tm)
Add a thread manager with the given name.
Specified by:
addThreadManager in interface SystemManagerIF

createStage

public StageIF createStage(java.lang.String stageName,
                           EventHandlerIF evHandler,
                           java.lang.String[] initargs)
                    throws java.lang.Exception
Create a stage with the given name from the given event handler with the given initial arguments.
Specified by:
createStage in interface ManagerIF
Following copied from interface: seda.sandStorm.api.ManagerIF
Parameters:
stagename - The name under which the new stage should be registered.
eventHandler - The event handler object which should be associated with the new stage.
initargs - The initial arguments to the stage, to be passed to the new stage through a ConfigDataIF.
Returns:
A handle to the newly-created stage.
Throws:
java.lang.Exception - If an exception occurred during stage creation or initialization.
See Also:
SystemManagerIF, ConfigDataIF

createStage

public StageIF createStage(StageWrapperIF wrapper,
                           boolean initialize)
                    throws java.lang.Exception
Create a stage from the given stage wrapper. If 'initialize' is true, initialize this stage immediately.
Specified by:
createStage in interface SystemManagerIF

getProfiler

public ProfilerIF getProfiler()
Return the system profiler.
Specified by:
getProfiler in interface ManagerIF

getSignalMgr

public SignalMgrIF getSignalMgr()
Return the system signal manager.
Specified by:
getSignalMgr in interface ManagerIF

getConfig

public SandstormConfig getConfig()
Return the SandstormConfig used to initialize this manager. Actually returns a copy of the SandstormConfig; this prevents options from being changed once the system has been initialized.
Specified by:
getConfig in interface ManagerIF

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/