cz.cuni.amis.pogamut.base.agent.params
Interface IAgentParameters

All Known Subinterfaces:
IRemoteAgentParameters, ITeamRemoteAgentParameters<SHARED_WORLDVIEW>
All Known Implementing Classes:
AgentParameters, RemoteAgentParameters, TeamRemoteAgentParameters, UT2004AgentParameters, UT2004AnalyzerObserverParameters, UT2004AnalyzerParameters

public interface IAgentParameters

Parent interface for all agent's parameters interfaces/implementations.

Note that this is the most general way for passing parameters to Java, i.e., you are allowed to pass arbitrary object (possibly containing getters for more objects) that configures your agent.

The best (and intended) usage is to put the implementation of this interface into the module for Guice IOC which will allow you to inject those parameters to any class you want allowing you to easily pass values from the outside to any inner agent's class (it suffice to put IAgentParameters as a parameter of the constructor used by Guice).


Method Summary
 void assignDefaults(IAgentParameters defaults)
          Fills missing parameters of 'this' with values from 'defaults'.
 IAgentId getAgentId()
          Returns unique agent's id (and human-readable name) that is going to be used by the newly created agent instance.
 

Method Detail

assignDefaults

void assignDefaults(IAgentParameters defaults)
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!

Parameters:
defaults - values that should filled missing parameters

getAgentId

IAgentId getAgentId()
Returns unique agent's id (and human-readable name) that is going to be used by the newly created agent instance.

Returns:
unique agent's id