edu.memphis.ccrg.lida.framework.mockclasses
Class MockGlobalWorkspaceImpl
java.lang.Object
edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
edu.memphis.ccrg.lida.globalworkspace.GlobalWorkspaceImpl
edu.memphis.ccrg.lida.framework.mockclasses.MockGlobalWorkspaceImpl
- All Implemented Interfaces:
- FrameworkModule, FullyInitializable, Initializable, RefractoryPeriod, GlobalWorkspace, TriggerListener
public class MockGlobalWorkspaceImpl
- extends GlobalWorkspaceImpl
- implements GlobalWorkspace
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getParam, getSubmodule, getSubmodule, getSubmodules, init, setAssistingTaskSpawner, setAssociatedModule, setModuleName, taskManagerDecayModule, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule |
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule |
triggers
public java.util.List<BroadcastTrigger> triggers
coalition
public Coalition coalition
trigger
public BroadcastTrigger trigger
MockGlobalWorkspaceImpl
public MockGlobalWorkspaceImpl()
addBroadcastListener
public void addBroadcastListener(BroadcastListener bl)
- Description copied from interface:
GlobalWorkspace
- To register a
BroadcastListener
. Each registered
BroadcastListener
receives Broadcast Implements Observer Pattern
- Specified by:
addBroadcastListener
in interface GlobalWorkspace
- Overrides:
addBroadcastListener
in class GlobalWorkspaceImpl
- Parameters:
bl
- the BroadcastListener to register
addBroadcastTrigger
public void addBroadcastTrigger(BroadcastTrigger t)
- Description copied from interface:
GlobalWorkspace
- To register Triggers
- Specified by:
addBroadcastTrigger
in interface GlobalWorkspace
- Overrides:
addBroadcastTrigger
in class GlobalWorkspaceImpl
- Parameters:
t
- a new Trigger
addCoalition
public boolean addCoalition(Coalition coalition)
- Description copied from interface:
GlobalWorkspace
- This method is invoked by the
AttentionCodelet
to add a new
Coalition
- Specified by:
addCoalition
in interface GlobalWorkspace
- Overrides:
addCoalition
in class GlobalWorkspaceImpl
- Parameters:
coalition
- to be added
- Returns:
- true if coalition was added
triggerBroadcast
public void triggerBroadcast(BroadcastTrigger trigger)
- Description copied from interface:
TriggerListener
- Listener must be able to trigger a broadcast
- Specified by:
triggerBroadcast
in interface TriggerListener
- Overrides:
triggerBroadcast
in class GlobalWorkspaceImpl
- Parameters:
trigger
- that wants to start the broadcast
addListener
public void addListener(ModuleListener listener)
- Description copied from interface:
FrameworkModule
- Generic way to add various kinds of listeners.
- Specified by:
addListener
in interface FrameworkModule
- Overrides:
addListener
in class GlobalWorkspaceImpl
- Parameters:
listener
- - listener of this FrameworkModule
decayModule
public void decayModule(long ticks)
- Description copied from interface:
FrameworkModule
- Decay only this Module.
- Specified by:
decayModule
in interface FrameworkModule
- Overrides:
decayModule
in class GlobalWorkspaceImpl
- Parameters:
ticks
- number of ticks to decay.
getModuleContent
public java.lang.Object getModuleContent(java.lang.Object... params)
- Description copied from interface:
FrameworkModule
- Returns module content specified by params. Should only be used by the GUI.
- Specified by:
getModuleContent
in interface FrameworkModule
- Overrides:
getModuleContent
in class GlobalWorkspaceImpl
- Parameters:
params
- - specifies what content will be returned.
- Returns:
- various kinds of content of this module.
init
public void init()
- Description copied from class:
FrameworkModuleImpl
- Implementations should only perform initialization of variables or
objects that depend on parameters in the parameter map specified in
FrameworkModuleImpl.init(Map)
.
Furthermore they should not try to access modules added via FrameworkModuleImpl.setAssociatedModule(FrameworkModule, String)
as this method will not have run yet at the time this method is called.
- Specified by:
init
in interface Initializable
- Overrides:
init
in class GlobalWorkspaceImpl