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