jade.domain
Class ams

java.lang.Object
  |
  +--jade.core.Agent
        |
        +--jade.domain.ams

public class ams
extends Agent
implements AgentManager.Listener

Standard Agent Management System agent. This class implements FIPA AMS agent. JADE applications cannot use this class directly, but interact with it through ACL message passing.

Author:
Giovanni Rimassa - Universita` di Parma
See Also:
Serialized Form

Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_TRANSIT, AP_WAITING, currentBehaviour, currentMessage, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN, MSG_QUEUE_SIZE
 
Constructor Summary
ams(AgentManager ap)
          This constructor creates a new AMS agent.
 
Method Summary
 void AMSDeregister(AMSAgentDescription amsd)
          it is called also by Agent.java
 void AMSRegister(AMSAgentDescription amsd)
          it is called also by Agent.java
 void handleDeadAgent(java.lang.String containerName, AID agentID)
          Post an event to the AMS agent.
 void handleDeadContainer(java.lang.String name)
          Post an event to the AMS agent.
 void handleMovedAgent(java.lang.String fromContainer, java.lang.String toContainer, AID agentID)
          Post an event to the AMS agent.
 void handleNewAgent(java.lang.String containerName, AID agentID)
          Post an event to the AMS agent.
 void handleNewContainer(java.lang.String name, java.net.InetAddress addr)
          Post an event to the AMS agent.
protected  void setup()
          This method starts the AMS behaviours to allow the agent to carry on its duties within JADE agent platform.
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, deregisterLanguage, deregisterOntology, doActivate, doClone, doDelete, doMove, doStart, doSuspend, doWait, doWait, doWake, extractContent, fillContent, getAID, getAMS, getDefaultDF, getHap, getLocalName, getName, getQueueSize, getState, lookupLanguage, lookupOntology, notifyRestarted, postMessage, putBack, read, read, receive, receive, registerLanguage, registerOntology, removeBehaviour, restartLater, restore, run, send, setQueueSize, takeDown, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ams

public ams(AgentManager ap)
This constructor creates a new AMS agent. Since a direct reference to an Agent Platform implementation must be passed to it, this constructor cannot be called from application code. Therefore, no other AMS agent can be created beyond the default one.
Method Detail

setup

protected void setup()
This method starts the AMS behaviours to allow the agent to carry on its duties within JADE agent platform.
Overrides:
setup in class Agent

AMSRegister

public void AMSRegister(AMSAgentDescription amsd)
                 throws FIPAException
it is called also by Agent.java

AMSDeregister

public void AMSDeregister(AMSAgentDescription amsd)
                   throws FIPAException
it is called also by Agent.java

handleNewContainer

public void handleNewContainer(java.lang.String name,
                               java.net.InetAddress addr)
Post an event to the AMS agent. This method must not be used by application agents.
Specified by:
handleNewContainer in interface AgentManager.Listener

handleDeadContainer

public void handleDeadContainer(java.lang.String name)
Post an event to the AMS agent. This method must not be used by application agents.
Specified by:
handleDeadContainer in interface AgentManager.Listener

handleNewAgent

public void handleNewAgent(java.lang.String containerName,
                           AID agentID)
Post an event to the AMS agent. This method must not be used by application agents.
Specified by:
handleNewAgent in interface AgentManager.Listener

handleDeadAgent

public void handleDeadAgent(java.lang.String containerName,
                            AID agentID)
Post an event to the AMS agent. This method must not be used by application agents.
Specified by:
handleDeadAgent in interface AgentManager.Listener

handleMovedAgent

public void handleMovedAgent(java.lang.String fromContainer,
                             java.lang.String toContainer,
                             AID agentID)
Post an event to the AMS agent. This method must not be used by application agents.
Specified by:
handleMovedAgent in interface AgentManager.Listener