public class RemoteAgentParameters extends AgentParameters implements IRemoteAgentParameters
If you need to populate the parameters after instantiation, use setters available in this
class: setAgentId(IAgentId)
, setWorldAddress(IWorldConnectionAddress)
.
NOTE: all IAgentParameters
implementors are usually used together with IAgentRunner
or IMultipleAgentRunner
which usually contains sensible default params, therefore there is no need to set all parameters
into newly created ones as runners will supply them via IAgentParameters.assignDefaults(IAgentParameters)
.
AgentParameters
Constructor and Description |
---|
RemoteAgentParameters() |
Modifier and Type | Method and Description |
---|---|
void |
assignDefaults(IAgentParameters defaults)
Fills missing parameters of 'this' with values from 'defaults'.
|
IWorldConnectionAddress |
getWorldAddress()
Address of the environment the newly created agent has to connect into.
|
RemoteAgentParameters |
setAgentId(IAgentId agentId)
Sets agent id into the parameters.
|
RemoteAgentParameters |
setWorldAddress(IWorldConnectionAddress address)
Sets connection address into the parameters.
|
getAgentId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAgentId
public IWorldConnectionAddress getWorldAddress()
IRemoteAgentParameters
getWorldAddress
in interface IRemoteAgentParameters
public RemoteAgentParameters setAgentId(IAgentId agentId)
AgentParameters
WARNING: Note that you should not mess with 'setters' in different threads as they are non-thread-safe and may interrupt horrible agent instantiations with such behavior.
setAgentId
in class AgentParameters
public RemoteAgentParameters setWorldAddress(IWorldConnectionAddress address)
WARNING: Note that you should not mess with 'setters' in different threads as they are non-thread-safe and may interrupt horrible agent instantiations with such behavior.
address
- public void assignDefaults(IAgentParameters defaults)
IAgentParameters
This method is meant as a hook for IAgentRunner
s that can ease the burden
of instantiating&launching the agent into a specific environment.
It assigns params from 'default' only to fields (of this) that are null!
assignDefaults
in interface IAgentParameters
assignDefaults
in class AgentParameters
defaults
- values that should filled missing parametersCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.