1 package cz.cuni.amis.pogamut.base.agent.module; 2 3 public interface IAgentLogic<LOGIC_MODULE extends LogicModule> { 4 5 /** 6 * Returns upper-estimation of {@link IAgentLogic#initializeLogic()} method running time in millis. 7 * @return 8 */ 9 public long getLogicInitializeTime(); 10 11 /** 12 * Called when the agent is started and just before the first {@link IAgentLogic#logic()} invocation. 13 * @param logicModule 14 */ 15 public void logicInitialize(LOGIC_MODULE logicModule); 16 17 /** 18 * Method that is called only once before actual {@link IAgentLogic#logic()} is called. 19 */ 20 public void beforeFirstLogic(); 21 22 /** 23 * Called to perform the logic of the agent. If performed by the {@link LogicModule} or its descendant then 24 * it is called periodically. 25 */ 26 public void logic(); 27 28 /** 29 * Called whenever the {@link LogicModule} is stopping to end the logic. 30 */ 31 public void logicShutdown(); 32 33 /** 34 * Returns upper-estimation of {@link IAgentLogic#logicShutdown()} method running time in millis. 35 * @return 36 */ 37 public long getLogicShutdownTime(); 38 39 }