seda.sandStorm.internal
Class SignalMgr

java.lang.Object
  extended by seda.sandStorm.internal.SignalMgr
All Implemented Interfaces:
SignalMgrIF

 class SignalMgr
extends java.lang.Object
implements SignalMgrIF

The SignalMgr is an implementation of SignalMgrIF. It allows stages to register to receive certain signals and delivers those signals once they are triggered.

See Also:
SignalMgrIF, SignalIF

Field Summary
private  java.util.Hashtable signalTbl
           
 
Constructor Summary
SignalMgr()
           
 
Method Summary
 void deregister(SignalIF signalType, SinkIF sink)
          Deregister for the given signal type.
 void register(SignalIF signalType, SinkIF sink)
          Register for the given signal type.
 void trigger(SignalIF signal)
          Send the given signal to all registered sinks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

signalTbl

private java.util.Hashtable signalTbl
Constructor Detail

SignalMgr

SignalMgr()
Method Detail

register

public void register(SignalIF signalType,
                     SinkIF sink)
Register for the given signal type. When the signal is triggered, an object of the given type (although not necessarily the same object instance) will be delivered to the given SinkIF.

Specified by:
register in interface SignalMgrIF

deregister

public void deregister(SignalIF signalType,
                       SinkIF sink)
Deregister for the given signal type.

Specified by:
deregister in interface SignalMgrIF

trigger

public void trigger(SignalIF signal)
Send the given signal to all registered sinks. Uses enqueue_lossy on each sink, so if a sink rejects the signal this method will continue regardless. Package access only. XXX MDW: Really should register sinks with the chain of superclasses for each signal as well, so that triggering a superclass of a given signal will also reach those sinks registered for the subclass.