|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmassim.framework.AbstractAgentFilter
public abstract class AbstractAgentFilter
This class provides a good start to build agent provider that are based on another agent provider which will just filter it's offers by some criteria based upon an agent parameter.
Constructor Summary | |
---|---|
protected |
AbstractAgentFilter(AgentProvider b)
|
Method Summary | |
---|---|
void |
allocateAgent(UniqueSimulationAgent agent)
Allocates an agent. |
void |
freeAgent(UniqueSimulationAgent agent)
Free an agent |
UniqueSimulationAgent[] |
getAgents(AgentParameter p)
Retrieve a list of available agents, fulfilling requirements as mentioned in agentparameter; |
AgentProvider |
getBase()
|
protected abstract boolean |
isSuitable(UniqueSimulationAgent a,
AgentParameter p)
This method determines if an agent suits the requirements found in agent parameters p. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractAgentFilter(AgentProvider b)
Method Detail |
---|
public AgentProvider getBase()
public UniqueSimulationAgent[] getAgents(AgentParameter p)
AgentProvider
getAgents
in interface AgentProvider
protected abstract boolean isSuitable(UniqueSimulationAgent a, AgentParameter p)
a
- agent candidatep
- agent requirements.
public void allocateAgent(UniqueSimulationAgent agent)
allocateAgent
in interface AgentProvider
agent
- to allocate.public void freeAgent(UniqueSimulationAgent agent)
AgentProvider
freeAgent
in interface AgentProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |