View Javadoc

1   package cz.cuni.amis.pogamut.udk.factory.guice.remoteagent;
2   
3   import cz.cuni.amis.pogamut.base.agent.IAgent;
4   import cz.cuni.amis.pogamut.base.agent.params.IRemoteAgentParameters;
5   import cz.cuni.amis.pogamut.base.factory.guice.GuiceAgentFactory;
6   import cz.cuni.amis.pogamut.udk.agent.params.UDKAgentParameters;
7   import cz.cuni.amis.pogamut.udk.observer.IUDKObserver;
8   import cz.cuni.amis.pogamut.udk.server.IUDKServer;
9   
10  /**
11   * Guice-based {@link IUDKObserver} factory. It needs {@link UDKObserverModule} to work correctly and the module is required
12   * to bound {@link IAgent} to the {@link IUDKObserver}, otherwise the method {@link UDKObserverFactory#newAgent(IRemoteAgentParameters)}
13   * will throw {@link ClassCastException}.
14   * <p><p>
15   * For more info about the factory, see {@link GuiceAgentFactory}.
16   *
17   * @author Jimmy
18   *
19   * @param <BOT>
20   * @param <PARAMS>
21   */
22  public class UDKObserverFactory<SERVER extends IUDKServer, PARAMS extends UDKAgentParameters> extends GuiceAgentFactory<SERVER, PARAMS> {
23  
24  	public UDKObserverFactory(UDKServerModule agentModule) {
25  		super(agentModule);
26  	}
27  	
28  	@Override
29  	protected UDKServerModule getAgentModule() {
30  		return (UDKServerModule) super.getAgentModule();
31  	}
32  
33  }