cz.cuni.amis.pogamut.ut2004.agent.module.logic
Class SyncUT2004BotLogic<BOT extends UT2004Bot<? extends ILockableVisionWorldView,?,?>>

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.LogicModule<BOT>
          extended by cz.cuni.amis.pogamut.ut2004.agent.module.logic.UT2004BotLogic<BOT>
              extended by cz.cuni.amis.pogamut.ut2004.agent.module.logic.SyncUT2004BotLogic<BOT>
All Implemented Interfaces:
IComponent

public class SyncUT2004BotLogic<BOT extends UT2004Bot<? extends ILockableVisionWorldView,?,?>>
extends UT2004BotLogic<BOT>


Field Summary
 
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
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
SyncUT2004BotLogic(BOT agent, IAgentLogic logic)
           
SyncUT2004BotLogic(BOT agent, IAgentLogic logic, java.util.logging.Logger log)
           
SyncUT2004BotLogic(BOT agent, IAgentLogic logic, java.util.logging.Logger log, ComponentDependencies dependencies)
           
 
Method Summary
protected  void afterLogic(java.lang.String threadName)
          Called right after the LogicModule.logic.doLogic() is called.
protected  void afterLogicException(java.lang.String threadName, java.lang.Throwable e)
          Called whenever some exception is thrown inside LogicRunner.
protected  void beforeLogic(java.lang.String threadName)
          Called right before the LogicModule.logic.doLogic() is called.
protected  boolean shouldExecuteLogic()
          Controls whether the LogicModule.logic.logic() will be called.
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.agent.module.logic.UT2004BotLogic
cleanUp, logicLatch, start
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.LogicModule
getLogicException, getLogicFrequency, getLogicPeriod, inThreadKilling, inThreadPausing, inThreadResuming, inThreadStopping, kill, pause, resume, setLogicFrequency, setMaxLogicFrequency, setMinLogicFrequency, stop
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
getComponentId, getLog, getState, initComponentId, isRunning, reset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyncUT2004BotLogic

@Inject
public SyncUT2004BotLogic(BOT agent,
                                 IAgentLogic logic)

SyncUT2004BotLogic

public SyncUT2004BotLogic(BOT agent,
                          IAgentLogic logic,
                          java.util.logging.Logger log)

SyncUT2004BotLogic

public SyncUT2004BotLogic(BOT agent,
                          IAgentLogic logic,
                          java.util.logging.Logger log,
                          ComponentDependencies dependencies)
Method Detail

beforeLogic

protected void beforeLogic(java.lang.String threadName)
Description copied from class: LogicModule
Called right before the LogicModule.logic.doLogic() is called.

Overrides:
beforeLogic in class LogicModule<BOT extends UT2004Bot<? extends ILockableVisionWorldView,?,?>>

afterLogic

protected void afterLogic(java.lang.String threadName)
Description copied from class: LogicModule
Called right after the LogicModule.logic.doLogic() is called.

Overrides:
afterLogic in class LogicModule<BOT extends UT2004Bot<? extends ILockableVisionWorldView,?,?>>

afterLogicException

protected void afterLogicException(java.lang.String threadName,
                                   java.lang.Throwable e)
Description copied from class: LogicModule
Called whenever some exception is thrown inside LogicRunner.

Overrides:
afterLogicException in class LogicModule<BOT extends UT2004Bot<? extends ILockableVisionWorldView,?,?>>

shouldExecuteLogic

protected boolean shouldExecuteLogic()
Description copied from class: LogicModule
Controls whether the LogicModule.logic.logic() will be called.

If logic is running & is not paused you may use this to fine control the moments when the logic should execute.

Returns 'true' as default.

Overrides:
shouldExecuteLogic in class LogicModule<BOT extends UT2004Bot<? extends ILockableVisionWorldView,?,?>>
Returns:
whether the logic should be executing