View Javadoc

1   package cz.cuni.amis.pogamut.udk.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.udk.agent.params.UDKAgentParameters;
9   import cz.cuni.amis.pogamut.udk.communication.worldview.UDKWorldView;
10  
11  public class UDKObserver extends AbstractUDKObserver<UDKWorldView, IAct> {
12  	
13  	/**
14  	 * Parameters passed into the constructor/factory/runner (by whatever means the agent has been started).
15  	 */
16      private UDKAgentParameters params;
17  
18  	@Inject
19      public UDKObserver(UDKAgentParameters params, IComponentBus bus, IAgentLogger agentLogger, UDKWorldView 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 UDKAgentParameters}
28       * to the constructor/factory/runner and pick them up here.
29       * 
30       * @return parameters
31       */
32      public UDKAgentParameters getParams() {
33  		return params;
34  	}
35  
36      
37  }