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

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

public interface BroadcastTrigger

A BroadcastTrigger determines when a new broadcast must be triggered. Its start() method should be invoked once and only once (this is likely to be when the GlobalWorkspace starts) Its checkForTriggerCondition(Collection) method is called every time a new Coalition enters the GlobalWorkspace.

Author:
Javier Snaider, Ryan J. McCall
See Also:
IndividualCoaltionActivationTrigger, NoBroadcastOccurringTrigger

Method Summary
 void checkForTriggerCondition(java.util.Collection<Coalition> coalitions)
          When called the trigger checks if its firing condition.
 void init(java.util.Map<java.lang.String,java.lang.Object> params, GlobalWorkspace gw)
          Provides a generic way to setup a BroadcastTrigger.
 void reset()
          Resets the trigger.
 void start()
          Starts the trigger.
 

Method Detail

init

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

Parameters:
params - a map for generic parameters
gw - A TriggerListener and likely a class that implements the GlobalWorkspace interface.

checkForTriggerCondition

void checkForTriggerCondition(java.util.Collection<Coalition> coalitions)
When called the trigger checks if its firing condition. If it has it initiates a competition for consciousness. This method is called for all registered triggers each time a new Coalition is put in the GlobalWorkspace

Parameters:
coalitions - All the Coalition objects currently in the GlobalWorkspace.

reset

void reset()
Resets the trigger. Called each time a new broadcast is triggered.


start

void start()
Starts the trigger.