edu.memphis.ccrg.lida.globalworkspace.triggers
Interface BroadcastTrigger

All Known Implementing Classes:
AggregateCoalitionActivationTrigger, IndividualCoaltionActivationTrigger, NoBroadcastOccurringTrigger, NoCoalitionArrivingTrigger

public interface BroadcastTrigger

A Trigger determines when a new Broadcast must be triggered. Its start method should be invoked once (most of the cases when the GlobalWorkspace starts) Its command method is called every time a new coalition enters the GW. See default Triggers as examples of implementation.

Author:
Javier Snaider

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
 

Method Detail

init

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

Parameters:
parameters - a map for generic parameters.
gw - A TriggerListener. Most of the cases is the same class that implements GlobalWorkspace Interface.

checkForTriggerCondition

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.

Parameters:
coalitions - All the coalitions in the GW.

reset

void reset()
To reset the Trigger. Its called each time a new Broadcast is Triggered.


start

void start()
To start the Trigger