public class df
extends jade.gui.GuiAgent
Standard Directory Facilitator agent. This class implements
FIPA DF agent. JADE applications
typically don't use this class directly, but interact with the DF agent through
ACL message passing. The DFService
class provides
a number of static methods that facilitate this task.
More DF agents can be created
by application programmers to divide a platform into many
Agent Domains.
A DF agent accepts a number of optional configuration parameters that can be set either as command line options or within a properties file (to be passed to the DF as an argument).
Parameter | Description |
---|---|
jade_domain_df_autocleanup
|
If set to true , indicates that the DF will automatically
clean up registrations as soon as an agent terminates. The default is false
|
jade_domain_df_maxleasetime
|
Indicates the maximum lease time (in millisecond) that the DF will grant for agent description registrations (defaults to infinite). |
jade_domain_df_maxresult
|
Indicates the maximum number of items found in a search operation that the DF will return to the requester (defaults to 100). |
jade_domain_df_disablevalidation
|
Turns off content validation on incoming/outgoing messages (defaults to false) |
jade_domain_df_db-default
|
If set to true , indicates that the DF will store its catalogue into an internal HSQL database,
running within the same VM. (The HSQL jar files have to added to the Java CLASSPATH)
|
jade_domain_df_db-url
|
Indicates the JDBC URL of the database the DF will store its catalogue into.
This parameter is ignored if jade_domain_df_db-default is set. If neither this parameter nor
jade_domain_df_db-default is specified the DF will keep its catalogue in memory.
|
jade_domain_df_db-driver
|
Indicates the JDBC driver to be used to access the DF database (defaults to the ODBC-JDBC bridge). This parameter
is ignored if jade_domain_df_db-url is not set or jade_domain_df_db-default is set.
|
jade_domain_df_db-username ,
jade_domain_df_db-password
|
Indicate the username and password to be used to access the DF database (default to null).
These parameters are ignored if jade_domain_df_db-url is not set or
jade_domain_df_db-default is set.
|
jade_domain_df_db-cleantables
|
If set to true , indicates that the DF will clean the content of all pre-existing database tables,
used by the DF. This parameter is ignored if the catalogue is not stored in a database.
|
jade_domain_df_db-abortonerror
|
If set to true , indicates that the DF will immediately terminate in case it cannot
connect to the database. This parameter is ignored if the catalogue is not stored in a database.
|
jade_domain_df_kb-factory
|
Indicates the name of the factory class that should be used to create the knowledge base objects for the DF. The class has to be a sub class of jade.domain.DFKBFactory. |
jade_domain_df_poolsize
|
The dimension of the pool of thread dedicated to serving registration, deregistration and search
requests. If 0 (default) is specified then registration, deregistration and search
requests are served directly by the df agent Thread. This parameter is ignored when using a
volatile (in-memory) knowledge base.
|
For instance the following command line will launch a JADE main container
with a DF that will store its catalogue into a database accessible at
URL jdbc:odbc:dfdb and that will keep agent registrations for 1 hour at most.
java jade.Boot -gui -jade_domain_df_db-url jdbc:odbc:dfdb -jade_domain_df_maxleasetime 3600000
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-Agent-Management :protocol fipa-request)
DFService
,
Serialized FormAgent.Interrupted
MSG_QUEUE_CLASS
Constructor and Description |
---|
df() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParent(AID dfName,
DFAgentDescription dfd)
This method can be used to add a parent (a DF this DF is federated with).
|
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 description of an agent registered with the DF.
|
protected void |
removeParent(AID dfName)
this method can be used to remove a parent (a DF with which this DF is federated).
|
protected void |
setDescriptionOfThisDF(DFAgentDescription dfd)
This method set the description of the df according to the DFAgentDescription passed.
|
protected boolean |
showGui()
This method make visible the GUI of the DF.
|
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getProperty, getQueueSize, here, isAlive, isRestarting, postMessage, putBack, putO2AObject, receive, receive, registerO2AInterface, removeBehaviour, restore, restoreBufferedState, send, setEnabledO2ACommunication, setO2AManager, setQueueSize, setup, takeDown, write
public DFAgentDescription getDFAgentDsc(AID name) throws FIPAException
FIPAException
public DFAgentDescription getDescriptionOfThisDF()
public DFAgentDescription getDescriptionOfThisDF(AID parent)
protected boolean showGui()
protected void setDescriptionOfThisDF(DFAgentDescription dfd)
protected void addParent(AID dfName, DFAgentDescription dfd)
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.protected void removeParent(AID dfName)