jade.domain
Class df

java.lang.Object
  |
  +--jade.core.Agent
        |
        +--jade.gui.GuiAgent
              |
              +--jade.domain.df

public class df
extends GuiAgent
implements DFGUIAdapter

Standard Directory Facilitator agent. This class implements FIPA DF agent. JADE applications cannot use this class directly, but interact with it through ACL message passing. More DF agents can be created by application programmers to divide a platform into many Agent Domains. Each DF has a GUI but, by default, it is not visible. The GUI of the agent platform includes a menu item that allows to show the GUI of the default DF. In order to show the GUI, you should simply send the following message to each DF agent: (request :content (action DFName (SHOWGUI)) :ontology jade-extensions :protocol fipa-request)

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
df()
          This constructor creates a new DF agent.
 
Method Summary
 void addParent(AID dfName, DFAgentDescription dfd)
          This method can be used to add a parent (a DF with which the this DF is federated).
 DFAgentDescription getDescriptionOfThisDF()
          This method returns the current description of this DF
 DFAgentDescription getDescriptionOfThisDF(AID parent)
          This method returns the description of this df used to federate with the given parent
 DFAgentDescription getDFAgentDsc(AID name)
          This method returns the descriptor of an agent registered with the df.
protected  void onGuiEvent(GuiEvent ev)
           
 void removeParent(AID dfName)
          this method can be used to remove a parent (a DF with which this DF is federated).
 void setDescriptionOfThisDF(DFAgentDescription dfd)
          This method set the description of the df according to the DFAgentAgentDescription passed.
protected  void setup()
          This method starts all behaviours needed by DF agent to perform its role within JADE agent platform.
 boolean showGui()
          This method make visible the GUI of the DF.
protected  void takeDown()
          Cleanup DF on exit.
 
Methods inherited from class jade.gui.GuiAgent
postGuiEvent
 
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, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

df

public df()
This constructor creates a new DF agent. This can be used to create additional DF agents, beyond the default one created by JADE on platform startup.
Method Detail

setup

protected void setup()
This method starts all behaviours needed by DF agent to perform its role within JADE agent platform.
Overrides:
setup in class Agent

showGui

public boolean showGui()
This method make visible the GUI of the DF.
Returns:
true if the GUI was not visible already, false otherwise.

takeDown

protected void takeDown()
Cleanup DF on exit. This method performs all necessary cleanup operations during agent shutdown.
Overrides:
takeDown in class Agent

onGuiEvent

protected void onGuiEvent(GuiEvent ev)
Overrides:
onGuiEvent in class GuiAgent

getDFAgentDsc

public DFAgentDescription getDFAgentDsc(AID name)
                                 throws FIPAException
This method returns the descriptor of an agent registered with the df.
Specified by:
getDFAgentDsc in interface DFGUIAdapter

setDescriptionOfThisDF

public void setDescriptionOfThisDF(DFAgentDescription dfd)
This method set the description of the df according to the DFAgentAgentDescription passed. The programmers can call this method to provide a different initialization of the description of the df they are implemented. The method is called inside the setup of the agent and set the df description using a default description.

getDescriptionOfThisDF

public DFAgentDescription getDescriptionOfThisDF()
This method returns the current description of this DF
Specified by:
getDescriptionOfThisDF in interface DFGUIAdapter

getDescriptionOfThisDF

public DFAgentDescription getDescriptionOfThisDF(AID parent)
This method returns the description of this df used to federate with the given parent
Specified by:
getDescriptionOfThisDF in interface DFGUIAdapter

addParent

public void addParent(AID dfName,
                      DFAgentDescription dfd)
This method can be used to add a parent (a DF with which the this DF is federated).
Parameters:
dfName - the parent df (the df with which this df has been registered)
dfd - the description used by this df to register with the parent.

removeParent

public void removeParent(AID dfName)
this method can be used to remove a parent (a DF with which this DF is federated).