edu.memphis.ccrg.lida.globalworkspace.triggers
Class NoBroadcastOccurringTrigger

java.lang.Object
  extended by edu.memphis.ccrg.lida.globalworkspace.triggers.NoBroadcastOccurringTrigger
All Implemented Interfaces:
BroadcastTrigger
Direct Known Subclasses:
NoCoalitionArrivingTrigger

public class NoBroadcastOccurringTrigger
extends java.lang.Object
implements BroadcastTrigger

This triggers activates if 'delay' ticks has passed without a broadcast.

Author:
Javier Snaider

Constructor Summary
NoBroadcastOccurringTrigger()
           
 
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.
 int getDelay()
           
 TaskManager getTaskManager()
           
 void init(java.util.Map<java.lang.String,java.lang.Object> parameters, GlobalWorkspace gw)
          This init expects an Integer with name "delay" standing for trigger delay.
 void reset()
          To reset the Trigger.
 void setTaskManager(TaskManager taskManager)
           
 void start()
          To start the Trigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoBroadcastOccurringTrigger

public NoBroadcastOccurringTrigger()
Method Detail

getTaskManager

public TaskManager getTaskManager()
Returns:
the TaskManager

getDelay

public int getDelay()
Returns:
delay

setTaskManager

public void setTaskManager(TaskManager taskManager)
Parameters:
taskManager - the TaskManager to set

init

public void init(java.util.Map<java.lang.String,java.lang.Object> parameters,
                 GlobalWorkspace gw)
This init expects an Integer with name "delay" standing for trigger delay. Also a String, "name" of the trigger for logging purposes.

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.
See Also:
BroadcastTrigger.init(Map, GlobalWorkspace)

start

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

Specified by:
start in interface BroadcastTrigger

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.

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