BOT - PARAMS - public class UDKBotRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters> extends AgentRunner<BOT,PARAMS>
The address where the instances will connect are defined either in the constructor
or taken from the properties of the PogamutPlatform.
For more information about the class see AgentRunner.
| Modifier and Type | Field and Description |
|---|---|
protected String |
host
Default host where the instances are going to be connected as defaults, see
IAgentParameters.assignDefaults(IAgentParameters). |
protected String |
name
Default name that will serve as a basis for
IAgentId, see IAgentParameters.assignDefaults(IAgentParameters). |
protected int |
port
Default port where the instances are going to be connected as defaults, see
IAgentParameters.assignDefaults(IAgentParameters). |
agents, consoleLogging, defaultLogLevel, factory, killed, killingAgents, killingAgentsMutex, latch, listener, log, main, mutex| Constructor and Description |
|---|
UDKBotRunner(Class<? extends IUDKBotController> botControllerClass)
Construct the runner without specifying anything as default.
|
UDKBotRunner(Class<? extends IUDKBotController> botControllerClass,
String name)
Construct the runner + specify the default name, host:port will be taken from the Pogamut platform properties.
|
UDKBotRunner(Class<? extends IUDKBotController> botControllerClass,
String name,
String host,
int port)
Construct the runner + specify all defaults.
|
UDKBotRunner(IAgentFactory<BOT,PARAMS> factory)
Construct the runner without specifying anything as default.
|
UDKBotRunner(IAgentFactory<BOT,PARAMS> factory,
String name)
Construct the runner + specify the default name, host:port will be taken from the Pogamut platform properties.
|
UDKBotRunner(IAgentFactory<BOT,PARAMS> factory,
String name,
String host,
int port)
Construct the runner + specify all defaults.
|
UDKBotRunner(UDKBotModule module)
Construct the runner without specifying anything as default.
|
UDKBotRunner(UDKBotModule module,
String name)
Construct the runner + specify the default name, host:port will be taken from the Pogamut platform properties.
|
UDKBotRunner(UDKBotModule module,
String name,
String host,
int port)
Construct the runner + specify all defaults.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHost()
Returns host, where newly launched bots will be connected to.
|
String |
getName()
Returns name that is going to be used to form new
IAgentId of the bots. |
int |
getPort()
Returns port, where newly launched bots will be connected to.
|
protected IAgentParameters |
newDefaultAgentParameters()
Provides default parameters that is,
IAgentId using name and SocketConnectionAddress
using host and port. |
UDKBotRunner<BOT,PARAMS> |
setHost(String host)
Sets host, where newly launched bots will be connected to.
|
UDKBotRunner<BOT,PARAMS> |
setName(String name)
Sets name that is going to be used to form new
IAgentId of the bots. |
UDKBotRunner<BOT,PARAMS> |
setPort(int port)
Sets port, where newly launched bots will be connected to.
|
BOT |
startAgent() |
List<BOT> |
startAgents(int count) |
List<BOT> |
startAgents(PARAMS... agentParameters) |
createAgentWithParams, fillInDefaults, fillInDefaults, getLog, isMain, isPausing, killAgent, killAgents, newAgentId, postStartedHook, postStartHook, preInitHook, preResumeHook, preStartHook, setConsoleLogging, setLog, setLogLevel, setMain, setPausing, startAgent, startAgentWithParams, startAgentWithParamsMainprotected String host
IAgentParameters.assignDefaults(IAgentParameters).protected int port
IAgentParameters.assignDefaults(IAgentParameters).protected String name
IAgentId, see IAgentParameters.assignDefaults(IAgentParameters).public UDKBotRunner(IAgentFactory<BOT,PARAMS> factory, String name, String host, int port)
public UDKBotRunner(IAgentFactory<BOT,PARAMS> factory, String name)
public UDKBotRunner(IAgentFactory<BOT,PARAMS> factory)
factory - factory to be used for creating new IUDKBot instancespublic UDKBotRunner(UDKBotModule module, String name, String host, int port)
module - Guice module that is going to be used by the UDKBotFactoryname - default name that serve as a basis for IAgentIdhost - default host where the instances are going to be connectedport - default port where the instances are going to be connectedpublic UDKBotRunner(UDKBotModule module, String name)
module - Guice module that is going to be used by the UDKBotFactoryname - default name that serve as a basis for IAgentIdpublic UDKBotRunner(UDKBotModule module)
module - Guice module that is going to be used by the UDKBotFactorypublic UDKBotRunner(Class<? extends IUDKBotController> botControllerClass, String name, String host, int port)
botControllerClass - controller that will be used to instantiate UDKBotModule, i.e., it will control the UDKBot instancename - default name that serve as a basis for IAgentIdhost - default host where the instances are going to be connectedport - default port where the instances are going to be connectedpublic UDKBotRunner(Class<? extends IUDKBotController> botControllerClass, String name)
botControllerClass - controller that will be used to instantiate UDKBotModule, i.e., it will control the UDKBot instancename - default name that serve as a basis for IAgentIdpublic UDKBotRunner(Class<? extends IUDKBotController> botControllerClass)
botControllerClass - controller that will be used to instantiate UDKBotModule, i.e., it will control the UDKBot instancepublic BOT startAgent() throws cz.cuni.amis.utils.exception.PogamutException
startAgent in interface IAgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>startAgent in class AgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionpublic List<BOT> startAgents(int count) throws cz.cuni.amis.utils.exception.PogamutException
startAgents in interface IAgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>startAgents in class AgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionpublic List<BOT> startAgents(PARAMS... agentParameters) throws cz.cuni.amis.utils.exception.PogamutException
startAgents in interface IAgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>startAgents in class AgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionpublic String getName()
IAgentId of the bots.public UDKBotRunner<BOT,PARAMS> setName(String name)
IAgentId of the bots.
If null is passed, generic "UDKBot" will be set.
name - name used for the newly started botspublic String getHost()
public UDKBotRunner<BOT,PARAMS> setHost(String host)
host - host running GBUDK server (can't be null)public int getPort()
public UDKBotRunner<BOT,PARAMS> setPort(int port)
port - at the host where GBUDK server is listening for bot connectionsprotected IAgentParameters newDefaultAgentParameters()
IAgentId using name and SocketConnectionAddress
using host and port.newDefaultAgentParameters in class AgentRunner<BOT extends IUDKBot,PARAMS extends UDKAgentParameters>Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.