public class UDKObserverRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters> extends AgentRunner<OBSERVER,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 |
|---|
UDKObserverRunner(IAgentFactory<OBSERVER,PARAMS> factory)
Construct the runner without specifying anything as default.
|
UDKObserverRunner(IAgentFactory<OBSERVER,PARAMS> factory,
String name)
Construct the runner + specify the default name, host:port will be taken from the Pogamut platform properties.
|
UDKObserverRunner(IAgentFactory<OBSERVER,PARAMS> factory,
String name,
String host,
int port)
Construct the runner + specify all defaults.
|
| Modifier and Type | Method and Description |
|---|---|
protected IAgentParameters |
newDefaultAgentParameters()
Provides default parameters that is,
IAgentId using name and SocketConnectionAddress
using host and port. |
OBSERVER |
startAgent() |
List<OBSERVER> |
startAgents(int count) |
List<OBSERVER> |
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 UDKObserverRunner(IAgentFactory<OBSERVER,PARAMS> factory, String name, String host, int port)
factory - to be used for creating new IUDKObserver 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 connectedpublic UDKObserverRunner(IAgentFactory<OBSERVER,PARAMS> factory, String name)
factory - factory to be used for creating new IUDKObserver instancesname - default name that serve as a basis for IAgentIdpublic UDKObserverRunner(IAgentFactory<OBSERVER,PARAMS> factory)
factory - factory to be used for creating new IUDKObserver instancespublic OBSERVER startAgent() throws cz.cuni.amis.utils.exception.PogamutException
startAgent in interface IAgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>startAgent in class AgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionpublic List<OBSERVER> startAgents(int count) throws cz.cuni.amis.utils.exception.PogamutException
startAgents in interface IAgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>startAgents in class AgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionpublic List<OBSERVER> startAgents(PARAMS... agentParameters) throws cz.cuni.amis.utils.exception.PogamutException
startAgents in interface IAgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>startAgents in class AgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>cz.cuni.amis.utils.exception.PogamutExceptionprotected IAgentParameters newDefaultAgentParameters()
IAgentId using name and SocketConnectionAddress
using host and port.newDefaultAgentParameters in class AgentRunner<OBSERVER extends IUDKObserver,PARAMS extends UDKAgentParameters>Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.