|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.memphis.ccrg.lida.framework.initialization.InitializableImpl edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
public abstract class FrameworkModuleImpl
Abstract implementation of FrameworkModule
Implementations should add
themselves to the agent.xml configuration file
Field Summary | |
---|---|
protected TaskSpawner |
taskSpawner
TaskSpawner used by this module |
Constructor Summary | |
---|---|
FrameworkModuleImpl()
Default constructor |
|
FrameworkModuleImpl(ModuleName name)
Creates a FrameworkModule with specified module name. |
Method Summary | |
---|---|
void |
addListener(ModuleListener listener)
Override this method to add a listener to the module |
void |
addSubModule(FrameworkModule module)
Adds submodule as a component of this FrameworkModule. |
boolean |
containsSubmodule(ModuleName name)
Returns whether this FrameworkModule contains a submodule with
specified ModuleName . |
boolean |
containsSubmodule(java.lang.String name)
Returns whether this FrameworkModule contains a submodule with
specified name. |
TaskSpawner |
getAssistingTaskSpawner()
Returns the TaskSpawner which this FrameworkModule uses to spawn tasks. |
java.lang.Object |
getModuleContent(java.lang.Object... params)
Intended to be called from the GUI. |
ModuleName |
getModuleName()
Gets moduleName. |
FrameworkModule |
getSubmodule(ModuleName name)
Gets specified submodule subModule. |
FrameworkModule |
getSubmodule(java.lang.String name)
Gets specified submodule. |
java.util.Map<ModuleName,FrameworkModule> |
getSubmodules()
Convenience method to get submodules |
void |
setAssistingTaskSpawner(TaskSpawner ts)
Specify the TaskSpawner which this FrameworkModule will use to spawn tasks. |
void |
setAssociatedModule(FrameworkModule module,
java.lang.String moduleUsage)
Sets an associated FrameworkModule. |
void |
setModuleName(ModuleName name)
Sets ModuleName. |
void |
taskManagerDecayModule(long ticks)
Framework users should not call this method. |
java.lang.String |
toString()
|
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl |
---|
containsParameter, getParam, getParameters, init, init |
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 |
---|
decayModule |
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable |
---|
containsParameter, getParam, getParameters, init, init |
Field Detail |
---|
protected TaskSpawner taskSpawner
TaskSpawner
used by this module
Constructor Detail |
---|
public FrameworkModuleImpl()
FrameworkModuleImpl(ModuleName name)
AgentXmlFactory
name
- ModuleName
of this FrameworkModule
AgentXmlFactory
Method Detail |
---|
public void setAssistingTaskSpawner(TaskSpawner ts)
FrameworkModule
TaskSpawner
which this FrameworkModule will use to spawn tasks.
setAssistingTaskSpawner
in interface FrameworkModule
ts
- the TaskSpawnerpublic TaskSpawner getAssistingTaskSpawner()
FrameworkModule
TaskSpawner
which this FrameworkModule uses to spawn tasks.
getAssistingTaskSpawner
in interface FrameworkModule
public FrameworkModule getSubmodule(ModuleName name)
FrameworkModule
getSubmodule
in interface FrameworkModule
name
- name of the desired submodule.
public FrameworkModule getSubmodule(java.lang.String name)
FrameworkModule
getSubmodule
in interface FrameworkModule
name
- name of the desired submodule.
public boolean containsSubmodule(ModuleName name)
FrameworkModule
FrameworkModule
contains a submodule with
specified ModuleName
.
containsSubmodule
in interface FrameworkModule
name
- ModuleName
of submodule
FrameworkModule
with specified ModuleName
in this FrameworkModule
public boolean containsSubmodule(java.lang.String name)
FrameworkModule
FrameworkModule
contains a submodule with
specified name.
containsSubmodule
in interface FrameworkModule
name
- ModuleName
of submodule
FrameworkModule
with specified name
in this FrameworkModule
public void addSubModule(FrameworkModule module)
FrameworkModule
addSubModule
in interface FrameworkModule
module
- submodule to addpublic java.util.Map<ModuleName,FrameworkModule> getSubmodules()
FrameworkModule
getSubmodules
in interface FrameworkModule
ModuleName
public void taskManagerDecayModule(long ticks)
TaskManager
. Decays this module and all its submodules.
Subclasses overriding this method must call this method first in order to have all
submodules decayed.
taskManagerDecayModule
in interface FrameworkModule
ticks
- number of ticks to decay.public void setModuleName(ModuleName name)
FrameworkModule
setModuleName
in interface FrameworkModule
name
- ModuleName
of this FrameworkModulepublic ModuleName getModuleName()
FrameworkModule
getModuleName
in interface FrameworkModule
ModuleName
of this FrameworkModulepublic java.lang.String toString()
toString
in class java.lang.Object
public void setAssociatedModule(FrameworkModule module, java.lang.String moduleUsage)
FullyInitializable
setAssociatedModule
in interface FullyInitializable
module
- the module to be associated.moduleUsage
- how module will be usedModuleUsage
public void addListener(ModuleListener listener)
addListener
in interface FrameworkModule
listener
- - listener of this FrameworkModulepublic java.lang.Object getModuleContent(java.lang.Object... params)
getModuleContent
in interface FrameworkModule
params
- parameters specifying what content will be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |