View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.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.ut2004.agent.params.UT2004AgentParameters;
7   import cz.cuni.amis.pogamut.ut2004.observer.IUT2004Observer;
8   
9   /**
10   * Guice-based {@link IUT2004Observer} factory. It needs {@link UT2004ObserverModule} to work correctly and the module is required
11   * to bound {@link IAgent} to the {@link IUT2004Observer}, otherwise the method {@link UT2004ObserverFactory#newAgent(IRemoteAgentParameters)}
12   * will throw {@link ClassCastException}.
13   * <p><p>
14   * For more info about the factory, see {@link GuiceAgentFactory}.
15   *
16   * @author Jimmy
17   *
18   * @param <BOT>
19   * @param <PARAMS>
20   */
21  public class UT2004ObserverFactory<SERVER extends IUT2004Observer, PARAMS extends UT2004AgentParameters> extends GuiceAgentFactory<SERVER, PARAMS> {
22  
23  	public UT2004ObserverFactory(UT2004ObserverModule agentModule) {
24  		super(agentModule);
25  	}
26  	
27  	@Override
28  	protected UT2004ObserverModule getAgentModule() {
29  		return (UT2004ObserverModule) super.getAgentModule();
30  	}
31  
32  }