edu.memphis.ccrg.lida.globalworkspace
Class MockBroadcastTrigger

java.lang.Object
  extended by edu.memphis.ccrg.lida.globalworkspace.MockBroadcastTrigger
All Implemented Interfaces:
BroadcastTrigger

public class MockBroadcastTrigger
extends java.lang.Object
implements BroadcastTrigger


Field Summary
 java.util.Collection<Coalition> coalitions
           
 boolean wasReset
           
 
Constructor Summary
MockBroadcastTrigger()
           
 
Method Summary
 void checkForTriggerCondition(java.util.Collection<Coalition> coalitions)
          Each time a new Coalition is put in the GW, this method is called for all the registered Triggers.
 void init(java.util.Map<java.lang.String,java.lang.Object> parameters, GlobalWorkspace gw)
          This method is a generic way to setup the Trigger.
 void reset()
          To reset the Trigger.
 void start()
          To start the Trigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coalitions

public java.util.Collection<Coalition> coalitions

wasReset

public boolean wasReset
Constructor Detail

MockBroadcastTrigger

public MockBroadcastTrigger()
Method Detail

checkForTriggerCondition

public void checkForTriggerCondition(java.util.Collection<Coalition> coalitions)
Description copied from interface: BroadcastTrigger
Each time a new Coalition is put in the GW, this method is called for all the registered Triggers.

Specified by:
checkForTriggerCondition in interface BroadcastTrigger
Parameters:
coalitions - All the coalitions in the GW.

init

public void init(java.util.Map<java.lang.String,java.lang.Object> parameters,
                 GlobalWorkspace gw)
Description copied from interface: BroadcastTrigger
This method is a generic way to setup the Trigger. It should be called when the trigger is created.

Specified by:
init in interface BroadcastTrigger
Parameters:
parameters - a map for generic parameters.
gw - A TriggerListener. Most of the cases is the same class that implements GlobalWorkspace Interface.

reset

public void reset()
Description copied from interface: BroadcastTrigger
To reset the Trigger. Its called each time a new Broadcast is Triggered.

Specified by:
reset in interface BroadcastTrigger

start

public void start()
Description copied from interface: BroadcastTrigger
To start the Trigger

Specified by:
start in interface BroadcastTrigger