cz.cuni.amis.pogamut.ut2004.logging.jmx
Class TestBotBase<T>

Package class diagram package TestBotBase
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT>
      extended by cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController
          extended by cz.cuni.amis.pogamut.ut2004.logging.jmx.TestBotBase<T>
All Implemented Interfaces:
IAgentLogic, IUT2004BotController, IUT2004BotLogicController, Future<T>

public class TestBotBase<T>
extends UT2004BotLogicController
implements Future<T>

Bot that will return result of its execution through get() method. The result must be set through setResultAndTerminate() or setResult() methods.

Author:
ik

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController
logicModule
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController
bot, log, USER_LOG_CATEGORY_ID
 
Constructor Summary
TestBotBase()
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
protected  void setResult(T res)
           
protected  void setResultAndTerminate(T res)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController
beforeFirstLogic, getLogicInitializeTime, getLogicShutdownTime, initializeController, initializeLogic, logic, logicInitialize, logicShutdown
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController
botFirstSpawn, botInitialized, botKilled, botShutdown, finishControllerInitialization, getAct, getBot, getInitializeCommand, getLog, getName, getPassword, getWorldView, prepareBot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotController
botFirstSpawn, botInitialized, botKilled, botShutdown, finishControllerInitialization, getAct, getBot, getInitializeCommand, getLog, getPassword, getWorldView, prepareBot
 

Constructor Detail

TestBotBase

public TestBotBase()
Method Detail

setResultAndTerminate

protected void setResultAndTerminate(T res)

setResult

protected void setResult(T res)

get

public T get()
      throws InterruptedException,
             ExecutionException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException

get

public T get(long timeout,
             TimeUnit unit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException
TimeoutException

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<T>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<T>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<T>


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.