bamboo.lss
Class StageManager

java.lang.Object
  extended by bamboo.lss.StageManager
All Implemented Interfaces:
ManagerIF

public class StageManager
extends Object
implements ManagerIF

A manager for DustDevil. Adapted from the one in SOSS to allow for dynamic creation of stages.

Version:
$Id: StageManager.java,v 1.4 2003/10/05 18:22:11 srhea Exp $
Author:
Sean C. Rhea

Field Summary
 
Fields inherited from interface seda.sandStorm.api.ManagerIF
MAINSINK
 
Constructor Summary
StageManager(SandstormConfigIF config)
           
 
Method Summary
 void addStage(String stagename, StageIF stage)
           
 StageIF createStage(String stagename, EventHandlerIF handler, String[] initargs)
           
 void destroyStage(String stagename)
          Note that calling this slightly violates the semantics of this method as defined in ManagerIF.
 SandstormConfigIF getConfig()
          Returns a copy of the SandstormConfigIF for this Manager.
 ProfilerIF getProfiler()
          Returns a handle to the system profiler.
 SignalMgrIF getSignalMgr()
          Returns a handle to the system signal interface.
 StageIF getStage(String stagename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StageManager

public StageManager(SandstormConfigIF config)
Method Detail

addStage

public void addStage(String stagename,
                     StageIF stage)

getStage

public StageIF getStage(String stagename)
                 throws NoSuchStageException
Specified by:
getStage in interface ManagerIF
Throws:
NoSuchStageException

createStage

public StageIF createStage(String stagename,
                           EventHandlerIF handler,
                           String[] initargs)
                    throws Exception
Specified by:
createStage in interface ManagerIF
Throws:
Exception

getSignalMgr

public SignalMgrIF getSignalMgr()
Returns a handle to the system signal interface.

Specified by:
getSignalMgr in interface ManagerIF

getProfiler

public ProfilerIF getProfiler()
Returns a handle to the system profiler.

Specified by:
getProfiler in interface ManagerIF

getConfig

public SandstormConfigIF getConfig()
Returns a copy of the SandstormConfigIF for this Manager. This contains all of the global options used by the runtime system. Note that modifying any options of this copy does not in fact change the runtime parameters of the system; this is used for informational purposes only.

Specified by:
getConfig in interface ManagerIF

destroyStage

public void destroyStage(String stagename)
                  throws Exception
Note that calling this slightly violates the semantics of this method as defined in ManagerIF. It does not remove all references to the stage, because the soss Main stage still has a reference to the node's classifier, which contains references to the sink, which has a reference to the EventHandler itself. So the stage won't completely disappear until the reference to the classifier is destroyed (see soss.core.Main.removeNode)

Specified by:
destroyStage in interface ManagerIF
Throws:
Exception