View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.agent.params;
2   
3   import cz.cuni.amis.pogamut.base.agent.IAgentId;
4   import cz.cuni.amis.pogamut.base.agent.impl.AgentId;
5   import cz.cuni.amis.pogamut.base.agent.params.IAgentParameters;
6   import cz.cuni.amis.pogamut.base.agent.params.impl.RemoteAgentParameters;
7   import cz.cuni.amis.pogamut.base.agent.utils.runner.IAgentRunner;
8   import cz.cuni.amis.pogamut.base.agent.utils.runner.IMultipleAgentRunner;
9   import cz.cuni.amis.pogamut.base.communication.connection.IWorldConnectionAddress;
10  import cz.cuni.amis.pogamut.base.communication.connection.impl.socket.ISocketConnectionAddress;
11  
12  /**
13   * Agent parameters are meant to provide run-time parameters needed by various UT2004 agents for 
14   * running such as {@link IAgentId} and {@link ISocketConnectionAddress}.
15   * <p><p>
16   * If you need to populate the parameters after instantiation, use setters available in this
17   * class: {@link UT2004AgentParameters#setAgentId(IAgentId)}, {@link UT2004AgentParameters#setWorldAddress(IWorldConnectionAddress)}.
18   * <p><p>
19   * NOTE: all {@link IAgentParameters} implementors are usually used together with {@link IAgentRunner} or {@link IMultipleAgentRunner}
20   * which usually contains sensible default params, therefore there is no need to set all parameters
21   * into newly created ones as runners will supply them via {@link IAgentParameters#assignDefaults(IAgentParameters)}.
22   * 
23   * @see RemoteAgentParameters
24   * @author Jimmy
25   */
26  public class UT2004AgentParameters extends RemoteAgentParameters {
27  
28  	/**
29  	 * If you need to populate the parameters after instantiation, use setters available in this
30  	 * class: {@link UT2004AgentParameters#setAgentId(IAgentId)}, {@link UT2004AgentParameters#setWorldAddress(IWorldConnectionAddress)}.
31  	 */
32  	public UT2004AgentParameters() {
33  		super();
34  	}
35  	
36  	@Override
37  	public UT2004AgentParameters setAgentId(IAgentId agentId) {
38  		super.setAgentId(agentId);
39  		return this;
40  	}
41  	
42  	@Override
43  	public UT2004AgentParameters setWorldAddress(IWorldConnectionAddress address) {
44  		super.setWorldAddress(address);
45  		return this;
46  	}
47  
48  }