public class AgentFactory
extends java.lang.Object
Constructor and Description |
---|
AgentFactory()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static AgentFactory |
getInstance()
Create a instance of AgentFactory.
|
void |
releaseAgent(IAgentController agent)
remove a agent
|
<T extends IAgentController> |
requestAgent(java.lang.Class<T> agentClass)
return agent, if exist, else create a new agent.
|
public AgentFactory()
public <T extends IAgentController> T requestAgent(java.lang.Class<T> agentClass)
agentClass
- class of agent which will be returnedjava.lang.InstantiationException
java.lang.IllegalAccessException
public void releaseAgent(IAgentController agent)
agent
- to removepublic static AgentFactory getInstance()