Package jade.tools.rma
Class rma
- java.lang.Object
-
- jade.core.Agent
-
- jade.tools.ToolAgent
-
- jade.tools.rma.rma
-
- All Implemented Interfaces:
TimerListener,Serializable,Serializable,Runnable
public class rma extends ToolAgent
Remote Management Agent agent. This class implements JADE RMA agent. JADE applications cannot use this class directly, but interact with it through ACL message passing. Besides, this agent has a GUI through which JADE Agent Platform can be administered.- Version:
- $Date$ $Revision$
- Author:
- Giovanni Rimassa - Universita' di Parma
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jade.tools.ToolAgent
ToolAgent.AMSListenerBehaviour, ToolAgent.EventHandler
-
Nested classes/interfaces inherited from class jade.core.Agent
Agent.Interrupted
-
-
Field Summary
-
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN, MSG_QUEUE_CLASS
-
-
Constructor Summary
Constructors Constructor Description rma()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRemotePlatform(AID remoteAMS)voidaddRemotePlatformFromURL(String url)protected voidafterClone()Actions to perform after cloning.voidafterLoad()protected voidafterMove()Actions to perform after moving.voidafterReload()voidafterThaw()voidbeforeFreeze()protected voidbeforeMove()This empty placeholder shall be overridden by user defined agents to execute some actions before the original agent instance on the source container is stopped (e.g.voidbeforeReload()voidchangeAgentOwnership(AID name, String ownership)Callback method for platform management GUI.voidcloneAgent(AID name, String newName, String container)Callback method for platform managementvoidexit()Callback method for platform management GUI.voidfreezeAgent(AID name, String repository)Callback method for platform managementAgentTreeModelgetModel()Callback method for platform management GUI.voidinstallMTP(String containerName)voidkillAgent(AID name)Callback method for platform management GUI.voidkillContainer(String name)Callback method for platform management GUI.voidloadAgent(AID name, String repository, String container)Callback method for platform managementvoidloadContainer(String name, String repository)Callback method for platform management GUI.voidmoveAgent(AID name, String container)Callback method for platform managementvoidnewAgent(String agentName, String className, Object[] arg, String containerName)Callback method for platform management GUI.voidnewAgent(String agentName, String className, Object[] arg, String ownerName, String containerName)Callback method for platform management GUI.voidrefreshRemoteAgent(APDescription platform, AID ams)voidregisterRemoteAgentWithAMS(AMSAgentDescription amsd)voidremoveRemotePlatform(APDescription platform)voidresumeAgent(AID name)Callback method for platform management GUI.voidresumeContainer(String name)Callback method for platform management GUI.voidsaveAgent(AID name, String repository)Callback method for platform managementvoidsaveContainer(String name, String repository)Callback method for platform management GUI.voidshutDownPlatform()Callback method for platform management GUI.voidsuspendAgent(AID name)Callback method for platform management GUI.voidsuspendContainer(String name)Callback method for platform management GUI.voidthawAgent(AID name, String repository, ContainerID newContainer)Callback method for platform managementprotected voidtoolSetup()This method starts the RMA behaviours to allow the agent to carry on its duties within JADE agent platform.protected voidtoolTakeDown()Cleanup during agent shutdown.voiduninstallMTP(String containerName)voiduninstallMTP(String containerName, String address)voidviewAPDescription(APDescription remoteAP, String title)voidviewAPDescription(String title)-
Methods inherited from class jade.tools.ToolAgent
beforeSave, getCancel, getRequest, getSubscribe, setup, takeDown
-
Methods inherited from class jade.core.Agent
addBehaviour, beforeClone, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBehavioursCnt, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getExecutedBehavioursCnt, getGenerateBehaviourEvents, getGenerateMessageEvents, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getPostedMessagesCnt, getProperty, getQueueSize, getReceivedMessagesCnt, getSentMessagesCnt, getState, here, isAlive, isRestarting, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, receive, registerO2AInterface, removeBehaviour, removeTimer, restartLater, restoreBufferedState, restoreFields, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setGenerateMessageEvents, setO2AManager, setQueueSize, waitUntilStarted, write
-
-
-
-
Method Detail
-
toolSetup
protected void toolSetup()
This method starts the RMA behaviours to allow the agent to carry on its duties within JADE agent platform.
-
toolTakeDown
protected void toolTakeDown()
Cleanup during agent shutdown. This method cleans things up when RMA agent is destroyed, disconnecting from AMS agent and closing down the platform administration GUI.- Overrides:
toolTakeDownin classToolAgent
-
beforeMove
protected void beforeMove()
Description copied from class:AgentThis empty placeholder shall be overridden by user defined agents to execute some actions before the original agent instance on the source container is stopped (e.g. releasing local resources such as a GUI).
IMPORTANT: At this point, it is ensured that the move process is successful and that a moved agent instance has been created on the destination container Therefore setting the value of a class field in this method will have no impact on the moved agent instance. Such parameters must indeed be set before thedoMove()method is called.
NOT available in MIDP- Overrides:
beforeMovein classToolAgent
-
afterMove
protected void afterMove()
Description copied from class:AgentActions to perform after moving. This empty placeholder method can be overridden by user defined agents to execute some actions just after arriving to the destination agent container for a migration.
NOT available in MIDP
-
afterClone
protected void afterClone()
Description copied from class:AgentActions to perform after cloning. This empty placeholder method can be overridden by user defined agents to execute some actions just after creating an agent copy to the destination agent container.
NOT available in MIDP- Overrides:
afterClonein classToolAgent
-
beforeReload
public void beforeReload()
- Overrides:
beforeReloadin classToolAgent
-
afterReload
public void afterReload()
- Overrides:
afterReloadin classToolAgent
-
beforeFreeze
public void beforeFreeze()
- Overrides:
beforeFreezein classToolAgent
-
getModel
public AgentTreeModel getModel()
Callback method for platform management GUI.
-
newAgent
public void newAgent(String agentName, String className, Object[] arg, String containerName)
Callback method for platform management GUI.
-
newAgent
public void newAgent(String agentName, String className, Object[] arg, String ownerName, String containerName)
Callback method for platform management GUI.
-
suspendAgent
public void suspendAgent(AID name)
Callback method for platform management GUI.
-
suspendContainer
public void suspendContainer(String name)
Callback method for platform management GUI.
-
resumeAgent
public void resumeAgent(AID name)
Callback method for platform management GUI.
-
changeAgentOwnership
public void changeAgentOwnership(AID name, String ownership)
Callback method for platform management GUI.
-
resumeContainer
public void resumeContainer(String name)
Callback method for platform management GUI.
-
killAgent
public void killAgent(AID name)
Callback method for platform management GUI.
-
saveContainer
public void saveContainer(String name, String repository)
Callback method for platform management GUI.
-
loadContainer
public void loadContainer(String name, String repository)
Callback method for platform management GUI.
-
killContainer
public void killContainer(String name)
Callback method for platform management GUI.
-
moveAgent
public void moveAgent(AID name, String container)
Callback method for platform management
-
cloneAgent
public void cloneAgent(AID name, String newName, String container)
Callback method for platform management
-
saveAgent
public void saveAgent(AID name, String repository)
Callback method for platform management
-
loadAgent
public void loadAgent(AID name, String repository, String container)
Callback method for platform management
-
freezeAgent
public void freezeAgent(AID name, String repository)
Callback method for platform management
-
thawAgent
public void thawAgent(AID name, String repository, ContainerID newContainer)
Callback method for platform management
-
exit
public void exit()
Callback method for platform management GUI.
-
shutDownPlatform
public void shutDownPlatform()
Callback method for platform management GUI.
-
installMTP
public void installMTP(String containerName)
-
uninstallMTP
public void uninstallMTP(String containerName)
-
addRemotePlatform
public void addRemotePlatform(AID remoteAMS)
-
addRemotePlatformFromURL
public void addRemotePlatformFromURL(String url)
-
viewAPDescription
public void viewAPDescription(String title)
-
viewAPDescription
public void viewAPDescription(APDescription remoteAP, String title)
-
removeRemotePlatform
public void removeRemotePlatform(APDescription platform)
-
refreshRemoteAgent
public void refreshRemoteAgent(APDescription platform, AID ams)
-
registerRemoteAgentWithAMS
public void registerRemoteAgentWithAMS(AMSAgentDescription amsd)
-
-