|
Protocols
Author: Fabio Bellifemine - Tiziana Trucco (CSELT S.p.a)
Date: 19/09/2001
Trying this set of examples the
user learn about the JADE support to FIPA interaction protocols.
In detail they show how to use the classes provided by the
framework (in the package jade.proto) to utilize these protocols.
This example illustrates several FIPA Request and FIPA Query
protocol flows using two or more companion agents. The flow
creation is random so restarting the example could generate
different interactions among the participants.
To launch this example directly from the command line enter:
java -classpath <jade-path> examples.protocols.ProtocolTester receiver1 receiver2 receiver3
The agent involved are:
Initiator | |
Description: | |
This agent plays initiator role in a conversation following standard 'fipa-request' or 'fipa-query' protocol. It sends randomly a REQUEST, a QUERY-IF or a QUERY-REF to a set of agent passed as argument by the user | |
Jade classes used: | |
AchieveREInitiator | |
Source | |
\src\examples\protocols\Initiator.java |
Responder | |
Description: | |
The companion agent of
Initiator.This agent plays responder role in
'fipa-request' and 'fipa-query' protocol
according to the messsage received. If a REQUEST arrives it answers random in one of the following way: - send an AGREE message and then an INFORM message - send an AGREE message and then a FAILURE message - send an AGREE message and then no message (in this case the Initiator agent will wait forever for the INFORM/FAILURE message) - send an AGREE message and then an out of sequence message - send an INFORM message - send a REFUSE message - send a NOT_UNDERSTOD message - send an out of sequence message - send no message If a QUERY-IF/QUERY-REF message arrives if replies in one of the following way: - sends a NOT_UNDERSTOOD message - sends a REFUSE message - sends a FAILURE message - sends an INFORM message - sends an out of sequence message - sends no message |
|
Jade classes used: | |
AchieveREResponder | |
Source | |
\src\examples\protocols\Responder.java |
The AchieveREInitiator class ( package jade.proto) is a single homogeneous and effective implementation of all the FIPA-Request-like interaction protocols. This kind of interaction protocol is characterized by the existence of a initiator that sends a single message ( it performs a single communicative act) in order to verify that the rational effect of the communicative act has been achieved or not. This example shows how the user can modify the standard ways AchieveREInitiator manages FIPA-Request-like interaction protocols.
ComplexInitiator | |
Description: | |
It is an extension of the Initiator agent ( see above ) that use a different way of handle interaction protocol states. In fact it has an AchieveREInitiator behaviour like its parent but messages handling is obtained registering specifying behaviours instead of overring the base class methods handleXXX(). The registered behaviours (istances of RWBehaviour class) display the different messages exchanged among the initiator and the partecipants. To try this example you must create a set of Responder agents and give their names to the ComplexInitiator agent as arguments. | |
Jade classes used: | |
AchieveREInitiator | |
Source | |
\src\examples\protocols\ComplexInitiator.java |
JADE
is a trademark of TILAB (formerly CSELT).
JADE has been developed jointly by TILAB
(formerly CSELT)
and the Computer
Engineering Group of the University
of Parma