|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner<BOT,PARAMS>
cz.cuni.amis.pogamut.usar2004.utils.USAR2004BotRunner<BOT,PARAMS>
BOT - PARAMS - public class USAR2004BotRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>
Class used for creating, connecting and starting servers with default settings that are taken from the properties.
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.
| Field Summary | |
|---|---|
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). |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner |
|---|
agents, consoleLogging, defaultLogLevel, factory, killed, killingAgents, killingAgentsMutex, latch, listener, log, main, mutex |
| Constructor Summary | |
|---|---|
USAR2004BotRunner(Class<? extends IUSAR2004BotController> botControllerClass,
String name,
String host,
int port)
Construct the runner + specify all defaults. |
|
USAR2004BotRunner(cz.cuni.amis.pogamut.base.factory.IAgentFactory<BOT,PARAMS> factory,
String name,
String host,
int port)
Construct the runner + specify all defaults. |
|
USAR2004BotRunner(USAR2004BotModule module,
String name,
String host,
int port)
Construct the runner + specify all defaults. |
|
| Method Summary | |
|---|---|
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 cz.cuni.amis.pogamut.base.agent.params.IAgentParameters |
newDefaultAgentParameters()
Provides default parameters that is, IAgentId using name and SocketConnectionAddress
using host and port. |
USAR2004BotRunner<BOT,PARAMS> |
setHost(String host)
Sets host, where newly launched bots will be connected to. |
USAR2004BotRunner<BOT,PARAMS> |
setName(String name)
Sets name that is going to be used to form new IAgentId of the bots. |
USAR2004BotRunner<BOT,PARAMS> |
setPort(int port)
Sets port, where newly launched bots will be connected to. |
BOT |
startAgent()
Construct the runner without specifying anything as default. |
List<BOT> |
startAgents(int count)
|
List<BOT> |
startAgents(PARAMS... agentParameters)
|
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner |
|---|
createAgentWithParams, fillInDefaults, fillInDefaults, getLog, isMain, isPausing, killAgent, killAgents, newAgentId, postStartedHook, postStartHook, preInitHook, preResumeHook, preStartHook, setConsoleLogging, setLog, setLogLevel, setMain, setPausing, startAgent, startAgentWithParams, startAgentWithParamsMain |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String host
IAgentParameters.assignDefaults(IAgentParameters).
protected int port
IAgentParameters.assignDefaults(IAgentParameters).
protected String name
IAgentId, see IAgentParameters.assignDefaults(IAgentParameters).
| Constructor Detail |
|---|
public USAR2004BotRunner(cz.cuni.amis.pogamut.base.factory.IAgentFactory<BOT,PARAMS> factory,
String name,
String host,
int port)
factory - to be used for creating new IUSAR2004Bot instancesname - 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 connected
public USAR2004BotRunner(USAR2004BotModule module,
String name,
String host,
int port)
module - Guice module that is going to be used by the USAR2004BotFactoryname - 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 connected
public USAR2004BotRunner(Class<? extends IUSAR2004BotController> botControllerClass,
String name,
String host,
int port)
botControllerClass - controller that will be used to instantiate USAR2004BotModule, i.e., it will control the USAR2004Bot 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 connected| Method Detail |
|---|
public BOT startAgent()
throws cz.cuni.amis.utils.exception.PogamutException
startAgent in interface cz.cuni.amis.pogamut.base.agent.utils.runner.IAgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>startAgent in class cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>botControllerClass - controller that will be used to instantiate USAR2004BotModule, i.e., it will control the USAR2004Bot instance
cz.cuni.amis.utils.exception.PogamutException
public List<BOT> startAgents(int count)
throws cz.cuni.amis.utils.exception.PogamutException
startAgents in interface cz.cuni.amis.pogamut.base.agent.utils.runner.IAgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>startAgents in class cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>cz.cuni.amis.utils.exception.PogamutException
public List<BOT> startAgents(PARAMS... agentParameters)
throws cz.cuni.amis.utils.exception.PogamutException
startAgents in interface cz.cuni.amis.pogamut.base.agent.utils.runner.IAgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>startAgents in class cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionpublic String getName()
IAgentId of the bots.
public USAR2004BotRunner<BOT,PARAMS> setName(String name)
IAgentId of the bots.
If null is passed, generic "USAR2004Bot" will be set.
name - name used for the newly started bots
public String getHost()
public USAR2004BotRunner<BOT,PARAMS> setHost(String host)
host - host running GB2004 server (can't be null)
public int getPort()
public USAR2004BotRunner<BOT,PARAMS> setPort(int port)
port - at the host where GB2004 server is listening for bot connections
protected cz.cuni.amis.pogamut.base.agent.params.IAgentParameters newDefaultAgentParameters()
IAgentId using name and SocketConnectionAddress
using host and port.
newDefaultAgentParameters in class cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner<BOT extends USAR2004Bot,PARAMS extends USAR2004AgentParameters>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||