cz.cuni.amis.pogamut.multi.params.impl
Class TeamRemoteAgentParameters<SHARED_WORLDVIEW extends ISharedWorldView>

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.params.impl.AgentParameters
      extended by cz.cuni.amis.pogamut.base.agent.params.impl.RemoteAgentParameters
          extended by cz.cuni.amis.pogamut.multi.params.impl.TeamRemoteAgentParameters<SHARED_WORLDVIEW>
All Implemented Interfaces:
IAgentParameters, IRemoteAgentParameters, ITeamAgentParameters<SHARED_WORLDVIEW>, ITeamRemoteAgentParameters<SHARED_WORLDVIEW>

public class TeamRemoteAgentParameters<SHARED_WORLDVIEW extends ISharedWorldView>
extends RemoteAgentParameters
implements ITeamRemoteAgentParameters<SHARED_WORLDVIEW>


Field Summary
protected  SHARED_WORLDVIEW sharedWorldView
           
 
Constructor Summary
TeamRemoteAgentParameters()
           
 
Method Summary
 void assignDefaults(IAgentParameters defaults)
          Fills missing parameters of 'this' with values from 'defaults'.
 SHARED_WORLDVIEW getSharedWorldView()
           
 TeamRemoteAgentParameters<SHARED_WORLDVIEW> setAgentId(IAgentId agentId)
          Sets agent id into the parameters.
 TeamRemoteAgentParameters<SHARED_WORLDVIEW> setSharedWorldView(SHARED_WORLDVIEW sharedWorldView)
          Sets instance of ISharedWorldView that should be used by this agent.
 TeamRemoteAgentParameters<SHARED_WORLDVIEW> setWorldAddress(IWorldConnectionAddress address)
          Sets connection address into the parameters.
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.params.impl.RemoteAgentParameters
getWorldAddress
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.params.impl.AgentParameters
getAgentId
 
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.base.agent.params.IRemoteAgentParameters
getWorldAddress
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.params.IAgentParameters
getAgentId
 

Field Detail

sharedWorldView

protected SHARED_WORLDVIEW extends ISharedWorldView sharedWorldView
Constructor Detail

TeamRemoteAgentParameters

public TeamRemoteAgentParameters()
Method Detail

getSharedWorldView

public SHARED_WORLDVIEW getSharedWorldView()
Specified by:
getSharedWorldView in interface ITeamAgentParameters<SHARED_WORLDVIEW extends ISharedWorldView>

setSharedWorldView

public TeamRemoteAgentParameters<SHARED_WORLDVIEW> setSharedWorldView(SHARED_WORLDVIEW sharedWorldView)
Sets instance of ISharedWorldView that should be used by this agent.

WARNING: Note that you should not mess with 'setters' in different threads as they are non-thread-safe and may interrupt horribly agent instantiations with such behavior.

Parameters:
sharedWorldView -
Returns:
this instance

setAgentId

public TeamRemoteAgentParameters<SHARED_WORLDVIEW> setAgentId(IAgentId agentId)
Description copied from class: AgentParameters
Sets agent id into the parameters.

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.

Overrides:
setAgentId in class RemoteAgentParameters
Returns:
this instance

setWorldAddress

public TeamRemoteAgentParameters<SHARED_WORLDVIEW> setWorldAddress(IWorldConnectionAddress address)
Description copied from class: RemoteAgentParameters
Sets connection address into the parameters.

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.

Overrides:
setWorldAddress in class RemoteAgentParameters
Returns:
this instance

assignDefaults

public void assignDefaults(IAgentParameters defaults)
Description copied from interface: IAgentParameters
Fills missing parameters of 'this' with values from 'defaults'.

This method is meant as a hook for IAgentRunners 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!

Specified by:
assignDefaults in interface IAgentParameters
Overrides:
assignDefaults in class RemoteAgentParameters
Parameters:
defaults - values that should filled missing parameters