|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ciagent.CIAgent | +--marketplace.FacilitatorAgent
The FacilitatorAgent
class implements the global facilitator
for the marketplace application.
Field Summary | |
protected java.util.Hashtable |
allAgents
|
protected java.util.Hashtable |
communities
|
protected BuySellMessage |
msg
|
protected java.util.Random |
random
|
Fields inherited from class ciagent.CIAgent |
agentPlatform,
children,
DEFAULT_ASYNCTIME,
DEFAULT_SLEEPTIME,
name,
parent,
traceLevel |
Constructor Summary | |
protected |
FacilitatorAgent()
Creates a FacilitatorAgent object. |
protected |
FacilitatorAgent(java.lang.String name)
Creates a FacilitatorAgent object. |
Method Summary | |
static FacilitatorAgent |
getInstance()
In the Singleton design pattern, used to get single instance. |
java.lang.String |
getTaskDescription()
Retrieves the task description (null). |
void |
initialize()
Initializes the agent by setting the sleep time to 10 seconds. |
void |
process()
Does nothing. |
void |
processCIAgentEvent(CIAgentEvent e)
Processes a CIAgentEvent. |
void |
processTimerPop()
Processes a timer pop by putting out a trace message. |
static void |
register(CIAgentEvent e)
Registers the agent contains in the given event. |
void |
reset()
Clears the agent and communities hashtables. |
void |
route(BuySellMessage msg)
Routes a message to the proper agent. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.util.Random random
protected java.util.Hashtable allAgents
protected java.util.Hashtable communities
protected BuySellMessage msg
Constructor Detail |
protected FacilitatorAgent()
FacilitatorAgent
object.
Note: can't be used as a Java Bean without public constructorprotected FacilitatorAgent(java.lang.String name)
FacilitatorAgent
object.name
- the String object that contains the name of the facilitatorMethod Detail |
public void initialize()
public void reset()
public java.lang.String getTaskDescription()
public void process()
public void processTimerPop()
public void processCIAgentEvent(CIAgentEvent e)
e
- the CIAgentEvent object to be processedpublic static FacilitatorAgent getInstance()
public static void register(CIAgentEvent e)
e
- the CIAgentEvent object that contains the agent to be registeredpublic void route(BuySellMessage msg)
msg
- the BuySellMessage object that contains the message to be
routed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |