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.

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


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.

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


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

coalitions - All the Coalition objects currently in the GlobalWorkspace.


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


void start()
Starts the trigger.