|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EASE.Agents.Engine.AllAgents
This class holds all the agents for both the controller and the specification interface.
At the moment only the engine really uses this, except for debugging purposes. Uses singleton pattern.
Field Summary | |
private static java.io.File |
agentFile
|
private static java.io.File |
condFile
|
private static Debugger |
debugger
|
private static Interface |
inInt
|
private static java.util.Vector |
listeners
|
private static ActInterface |
outInt
|
private static AgentHolder |
theAgents
|
Constructor Summary | |
AllAgents()
|
Method Summary | |
InstantiatedAgent |
addInstantiated(InstantiatedContract ic,
java.util.Hashtable params,
InstantiatedAgent parent)
Create a new instantiated agent and add it to the list of instantiated agents. |
void |
addListener(AgentListener l)
Add an agent listener |
void |
breakContracts(java.util.Vector contracts)
Called by an agent to break the contracts in the Vector. |
java.util.Vector |
getFactories()
Gets all the factories. |
Factory |
getFactory(java.lang.String name)
Get a factory by name. |
java.lang.ThreadGroup |
getFactoryThreads()
Access to the factory thread group |
java.util.Hashtable |
getGeneric()
|
java.util.Vector |
getInstantiated()
Get all instantiated agents |
java.util.Vector |
getSaved()
|
void |
loadAgents(java.io.File f)
Specificies an agent file to use (does not load). |
void |
removeInstantiated(java.util.Vector agents)
Take an instantiated agent off the list. |
void |
resumeFactories()
Used by the start control to start the factories. |
void |
setFactories(java.util.Vector f)
Sets the factories for the domain. |
void |
setInputInterface(Interface inter)
Sets the input interface for the simulated thing. |
void |
setOutputInterface(ActInterface inter)
Sets the output interface for the simulated thing. |
void |
start()
Starts the controller |
void |
stop()
Stop the controller |
void |
suspendFactories()
Used by the start control to stop the factories. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static AgentHolder theAgents
private static ActInterface outInt
private static Interface inInt
private static Debugger debugger
private static java.io.File condFile
private static java.io.File agentFile
private static java.util.Vector listeners
Constructor Detail |
public AllAgents()
Method Detail |
public java.util.Vector getInstantiated()
public java.util.Hashtable getGeneric()
public java.util.Vector getSaved()
public InstantiatedAgent addInstantiated(InstantiatedContract ic, java.util.Hashtable params, InstantiatedAgent parent)
public void removeInstantiated(java.util.Vector agents)
public void breakContracts(java.util.Vector contracts)
public java.util.Vector getFactories()
public void suspendFactories()
public void resumeFactories()
public Factory getFactory(java.lang.String name)
If the factory is part of a vector factory return the top level vector factory.
public void loadAgents(java.io.File f)
public void setOutputInterface(ActInterface inter)
public void setInputInterface(Interface inter)
public void setFactories(java.util.Vector f)
Need to start and suspend each factory to ensure that resume works in controller.
public void start()
public void stop()
public java.lang.ThreadGroup getFactoryThreads()
public void addListener(AgentListener l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |