View Javadoc

1   package cz.cuni.amis.pogamut.base.factory;
2   
3   import cz.cuni.amis.pogamut.base.agent.IAgent;
4   import cz.cuni.amis.pogamut.base.agent.params.IAgentParameters;
5   import cz.cuni.amis.utils.exception.PogamutException;
6   
7   /**
8    * General factory that instantiates the agent according to the passed parameters. Note that every factory may require
9    * different {@link IAgentParameters} descendants/implementors according to the agent type and target agent environment.
10   * @author Jimmy
11   *
12   * @param <AGENT> type of the agent the factory is producing
13   * @param <PARAMS> type of the parameters that the agent is configured with
14   */
15  public interface IAgentFactory<AGENT extends IAgent, PARAMS extends IAgentParameters> {
16  	
17  	/**
18  	 * Factory method - it creates an agent with 'agentParameters'
19  	 * <p><p>
20  	 * <b>DOES NOT START THE AGENT!</b>
21  	 *  
22  	 * @param agentParameters
23  	 * @return new agent instance configured with 'agentParameters'
24  	 * @throws PogamutException
25  	 */
26  	public AGENT newAgent(PARAMS agentParameters) throws PogamutException;
27  
28  }