View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.observer.impl;
2   
3   import com.google.inject.Inject;
4   
5   import cz.cuni.amis.pogamut.base.communication.command.IAct;
6   import cz.cuni.amis.pogamut.base.component.bus.IComponentBus;
7   import cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger;
8   import cz.cuni.amis.pogamut.ut2004.agent.params.UT2004AgentParameters;
9   import cz.cuni.amis.pogamut.ut2004.communication.worldview.UT2004WorldView;
10  
11  public class UT2004Observer extends AbstractUT2004Observer<UT2004WorldView, IAct> {
12  	
13  	/**
14  	 * Parameters passed into the constructor/factory/runner (by whatever means the agent has been started).
15  	 */
16      private UT2004AgentParameters params;
17  
18  	@Inject
19      public UT2004Observer(UT2004AgentParameters params, IComponentBus bus, IAgentLogger agentLogger, UT2004WorldView worldView, IAct act) {
20          super(params.getAgentId(), bus, agentLogger, worldView, act);
21          this.params = params;
22      }
23      
24      /**
25       * Returns parameters that were passed into the agent during the construction. 
26       * <p><p>
27       * This is a great place to parametrize your agent. Note that you may pass arbitrary subclass of {@link UT2004AgentParameters}
28       * to the constructor/factory/runner and pick them up here.
29       * 
30       * @return parameters
31       */
32      public UT2004AgentParameters getParams() {
33  		return params;
34  	}
35  
36      
37  }