|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--com.ibm.able.AbleObject | +--com.ibm.able.agents.AbleDefaultAgent | +--com.ibm.able.platform.agents.FipaAgentDefaultAgent
This class provides a simple implementation of the FipaAgent interface. It is a convenience class that provides built-in FIPA AMS & DF Agent Descriptors that can be filled in by subclasses, and methods to register and deregister with the AMS & DF agents.
Additional methods are also provided to handle FIPA architected ACL messages, but the implementations of these methods do nothing and must be overridden by subclasses. The one exception is the quitAgent() method, which will unbind the agent from RMI and deregister the agent with the AMS and DF if registered at those places. In a nutshell, if an agent derived from this class does not care about a particular FIPA ACL message, CFP, for example, the agent need do nothing as by default the message will be ignored. However, if a certain action needs to be done in response to a particular message, then the derived class will need to override the method that handles that particular message.
Field Summary | |
protected FipaAmsAgentDescription |
myAmsAd
An AMS Agent Description of this agent. |
protected FipaDfAgentDescription |
myDfAd
An DF Agent Description of this agent. |
protected java.util.Vector |
myDfServices
A list of FipaServiceDescription objects. |
Fields inherited from class com.ibm.able.agents.AbleDefaultAgent |
activeDataSource,
agentAddr,
agentHost,
agentName,
beans,
effectors,
eventConnections,
numEpochs,
processList,
processListOK,
sensors |
Fields inherited from class com.ibm.able.AbleObject |
changed,
chgSupport,
comment,
dataFlowEnabled,
destBufferConnections,
eventQueue,
fileName,
inputBuffer,
listeners,
logger,
name,
outputBuffer,
parent,
propertyConnectionMgr,
sourceBufferConnections,
state,
stateChgSupport |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
FipaAgentDefaultAgent()
Create a new FipaAgentDefaultAgent. |
|
FipaAgentDefaultAgent(java.lang.String theName)
Create a new FipaAgent and specify it's name. |
|
FipaAgentDefaultAgent(java.lang.String theName,
java.lang.String theComment)
Create a new FipaAgent, specify it's name, and give it a comment. |
Method Summary | |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
void |
deregisterWithAms()
Deregister this agent with this platform's AMS. |
void |
deregisterWithDf()
Deregister this agent with this platform's DF. |
void |
destroyAgent()
|
void |
executeAgent()
|
void |
invokeAgent()
|
static void |
main(java.lang.String[] args)
|
void |
moveAgent()
|
void |
msgAcceptProposal(FipaAclMessage theAclMessage)
|
void |
msgAgree(FipaAclMessage theAclMessage)
|
void |
msgCancel(FipaAclMessage theAclMessage)
|
void |
msgCfp(FipaAclMessage theAclMessage)
|
void |
msgConfirm(FipaAclMessage theAclMessage)
|
void |
msgDisconfirm(FipaAclMessage theAclMessage)
|
void |
msgFailure(FipaAclMessage theAclMessage)
|
void |
msgInform(FipaAclMessage theAclMessage)
|
void |
msgInformIf(FipaAclMessage theAclMessage)
|
void |
msgInformRef(FipaAclMessage theAclMessage)
|
void |
msgNotUnderstood(FipaAclMessage theAclMessage)
|
void |
msgPropose(FipaAclMessage theAclMessage)
|
void |
msgQueryIf(FipaAclMessage theAclMessage)
|
void |
msgQueryRef(FipaAclMessage theAclMessage)
|
void |
msgRefuse(FipaAclMessage theAclMessage)
|
void |
msgRejectProposal(FipaAclMessage theAclMessage)
|
void |
msgRequest(FipaAclMessage theAclMessage)
|
void |
msgRequestWhen(FipaAclMessage theAclMessage)
|
void |
msgRequestWhenever(FipaAclMessage theAclMessage)
|
void |
msgSubscribe(FipaAclMessage theAclMessage)
|
void |
quitAgent()
Terminate this agent. |
FipaAmsAgent |
registerWithAms()
Register this agent with this platform's AMS. |
FipaDfAgent |
registerWithDf()
Register this agent with this platform's DF. |
void |
resumeAgent()
|
void |
suspendAgent()
|
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
void |
waitAgent()
|
void |
wakeUpAgent()
|
Methods inherited from class com.ibm.able.agents.AbleDefaultAgent |
addBean,
addEffector,
addEventConnection,
addSensor,
buildProcessList,
clsNm,
containsBean,
containsBean,
debugTrace,
getAgentAddr,
getAgentHost,
getAgentName,
getBean,
getBeans,
getDataSource,
getEffectors,
getNumEpochs,
getProcessList,
getSensors,
handleAbleEvent,
init,
init,
invokeEffector,
invokeSensor,
isActiveDataSource,
process,
propertyChange,
quitAll,
quitEnabledEventProcessing,
removeAllBeans,
removeBean,
removeEffector,
removeEventConnection,
removeSensor,
reset,
resumeAll,
rmiRebind,
rmiUnbind,
setActiveDataSource,
setEffectors,
setProcessList,
setSensors,
suspendAll |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone,
exportObject,
exportObject,
exportObject,
unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost,
getLog,
setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals,
getRef,
hashCode,
toStub |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected FipaAmsAgentDescription myAmsAd
protected FipaDfAgentDescription myDfAd
protected java.util.Vector myDfServices
Constructor Detail |
public FipaAgentDefaultAgent() throws java.rmi.RemoteException
public FipaAgentDefaultAgent(java.lang.String theName) throws java.rmi.RemoteException
theName
- A string containing the name of this new agent.
public FipaAgentDefaultAgent(java.lang.String theName, java.lang.String theComment) throws java.rmi.RemoteException
theName
- A string containing the name of this new agent.
theComment
- A string containing a comment for this new agent.
Method Detail |
public void invokeAgent() throws java.rmi.RemoteException
public void destroyAgent() throws java.rmi.RemoteException
public void quitAgent() throws java.rmi.RemoteException
public void suspendAgent() throws java.rmi.RemoteException
public void resumeAgent() throws java.rmi.RemoteException
public void waitAgent() throws java.rmi.RemoteException
public void wakeUpAgent() throws java.rmi.RemoteException
public void moveAgent() throws java.rmi.RemoteException
public void executeAgent() throws java.rmi.RemoteException
public void msgAcceptProposal(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgAgree(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgCancel(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgCfp(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgConfirm(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgDisconfirm(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgFailure(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgInform(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgInformIf(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgInformRef(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgNotUnderstood(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgPropose(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgQueryIf(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgQueryRef(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgRefuse(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgRejectProposal(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgRequest(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgRequestWhen(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgRequestWhenever(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public void msgSubscribe(FipaAclMessage theAclMessage) throws java.rmi.RemoteException
public FipaAmsAgent registerWithAms() throws java.rmi.RemoteException
Note that someone must fill in the AMS Agent Description before this method is called!
public void deregisterWithAms() throws java.rmi.RemoteException
It is safe to call this method even if the agent has never registered with the AMS -- no action will be taken.
public FipaDfAgent registerWithDf() throws java.rmi.RemoteException
Note that someone must fill in the DF Agent Description before this method is called!
public void deregisterWithDf() throws java.rmi.RemoteException
It is safe to call this method even if the agent has never registered with the DF -- no action will be taken.
public static void main(java.lang.String[] args) throws java.rmi.RemoteException
public java.lang.String toString()
public static java.lang.String Copyright()
|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |