cz.cuni.amis.pogamut.ut2004.agent.module.logic
Class UT2004BotLogic<BOT extends UT2004Bot>
java.lang.Object
cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.LogicModule<BOT>
cz.cuni.amis.pogamut.ut2004.agent.module.logic.UT2004BotLogic<BOT>
- All Implemented Interfaces:
- IComponent
- Direct Known Subclasses:
- AsyncUT2004BotLogic, SyncUT2004BotLogic
public class UT2004BotLogic<BOT extends UT2004Bot>
- extends LogicModule<BOT>
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.LogicModule |
lastLogicRun, logic, logicException, logicFrequency, logicPaused, logicPeriod, logicRunning, logicShouldPause, logicShouldRun, logicThread, MAX_LOGIC_FREQUENCY, MAX_LOGIC_PERIOD_MILLIS, MIN_LOGIC_FREQUENCY, MIN_LOGIC_PERIOD_MILLIS, mutex |
Method Summary |
protected void |
cleanUp()
Hook where to perform clean up of data structures of the module. |
protected void |
logicLatch(java.lang.String threadName)
Called before the IAgentLogic.logic() is periodically called - allows you to sleep the logic until the rest of the agent is ready. |
protected void |
start(boolean startPaused)
Starts the agent module. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.LogicModule |
afterLogic, afterLogicException, beforeLogic, getLogicException, getLogicFrequency, getLogicPeriod, inThreadKilling, inThreadPausing, inThreadResuming, inThreadStopping, kill, pause, resume, setLogicFrequency, setMaxLogicFrequency, setMinLogicFrequency, shouldExecuteLogic, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UT2004BotLogic
@Inject
public UT2004BotLogic(BOT agent,
IAgentLogic logic)
UT2004BotLogic
public UT2004BotLogic(BOT agent,
IAgentLogic logic,
java.util.logging.Logger log)
UT2004BotLogic
public UT2004BotLogic(BOT agent,
IAgentLogic logic,
java.util.logging.Logger log,
ComponentDependencies dependencies)
logicLatch
protected void logicLatch(java.lang.String threadName)
- Description copied from class:
LogicModule
- Called before the
IAgentLogic.logic()
is periodically called - allows you to sleep the logic until the rest of the agent is ready.
- Overrides:
logicLatch
in class LogicModule<BOT extends UT2004Bot>
start
protected void start(boolean startPaused)
throws AgentException
- Description copied from class:
AgentModule
- Starts the agent module. (Called even if starting to paused state.)
- Overrides:
start
in class LogicModule<BOT extends UT2004Bot>
- Throws:
AgentException
cleanUp
protected void cleanUp()
throws AgentException
- Description copied from class:
AgentModule
- Hook where to perform clean up of data structures of the module.
Called from AgentModule.stop()
, AgentModule.kill()
, AgentModule.reset()
.
- Overrides:
cleanUp
in class AgentModule<BOT extends UT2004Bot>
- Throws:
AgentException