|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.agent.FIPAOSAgent | +--repserver.RepAgent | +--ihelp.MMAgent
MMAgent is the IHelp matchmaker agent It maintains a hashtable of personal agents, broadcasts help requests to all the PersAgents that it knows about and assembles the replies that it gets.
Inner Class Summary | |
class |
MMAgent.FindTask
FindTask sends a help request to all the personal agents that this MM knows about. |
class |
MMAgent.HandleRequestTask
Handles all incoming i-help requests |
class |
MMAgent.IdleTask
IdleTask |
class |
MMAgent.SendFindTask
send a message to the given agent to see if the agents user is willing and able to help. |
Inner classes inherited from class repserver.RepAgent |
RepAgent.RegisterTask, RepAgent.RepServerManagementTask, RepAgent.StateTask |
Inner classes inherited from class fipaos.agent.FIPAOSAgent |
fipaos.agent.FIPAOSAgent.TopLevelHandlerTask |
Fields inherited from class fipaos.agent.FIPAOSAgent |
_database_profile, _registered_with, _state, _tm |
Constructor Summary | |
MMAgent(java.lang.String platform,
java.lang.String name,
java.lang.String ownership,
fipaos.ont.fipa.fipaman.AgentID rs,
java.lang.String role,
java.lang.String group_name)
|
Method Summary | |
void |
addPersAgent(fipaos.ont.fipa.fipaman.AgentID aid)
Add the given AgentID to the MM |
void |
checkForFailure()
generate a random number, and if the number is in the range to fail, shutdown this agent. |
void |
delPersAgent(fipaos.ont.fipa.fipaman.AgentID aid)
Remove the given AgentID from the MM |
byte[] |
getAState()
returns a byte stream representing the current state of this agent. |
void |
goActive()
Code to execute when this agent is set to ACTIVE_AGENT. |
boolean |
hasPersAgent(fipaos.ont.fipa.fipaman.AgentID aid)
true if the given AgentID is registered with this MM |
java.lang.String |
listAgents()
List, as a string the names of all the agents currently registered with this matchmaker |
static void |
main(java.lang.String[] args)
Test harness |
boolean |
setAState(byte[] b)
set the state of the agent, given a byte stream. |
void |
shutdown()
|
Methods inherited from class repserver.RepAgent |
doneRepAgent_RegisterTask, getConvs, getGroupName, getLocalPostOffice, getProxyAID, getReceiver, getRepServer, getRole, isActiveAgent, isReplicant, removeConv, sendReply, sendReply, setLocalPostOffice, setRepServer, setRole |
Methods inherited from class fipaos.agent.FIPAOSAgent |
activate, addNewProtocol, deregisterWithAMS, deregisterWithDF, forward, forward, getAID, getCM, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, knowsProtocol, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, registeredWith, registeredWithAMS, registeredWithDF, registerWithAMS, registerWithAMS, registerWithAMS, registerWithAMS, registerWithDF, registerWithDF, registerWithDF, registerWithDF, sendNotUnderstood, sendNotUnderstood, setListenerTask, setMessageSender, startPushing, waitForPushLock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MMAgent(java.lang.String platform, java.lang.String name, java.lang.String ownership, fipaos.ont.fipa.fipaman.AgentID rs, java.lang.String role, java.lang.String group_name)
Method Detail |
public void goActive()
RepAgent
goActive
in class RepAgent
public void shutdown()
shutdown
in class fipaos.agent.FIPAOSAgent
public boolean hasPersAgent(fipaos.ont.fipa.fipaman.AgentID aid)
public void addPersAgent(fipaos.ont.fipa.fipaman.AgentID aid)
public void delPersAgent(fipaos.ont.fipa.fipaman.AgentID aid)
public java.lang.String listAgents()
public void checkForFailure()
public byte[] getAState()
RepAgent
getAState
in class RepAgent
public boolean setAState(byte[] b)
setAState
in class RepAgent
repserver.RepAgent
state
- a byte stream representing the state of this agent.
returns true if successful.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |