Package jade.domain

Class AMSService


  • public class AMSService
    extends FIPAService
    This class provides a set of static methods to communicate with a AMS Service that complies with FIPA specifications. Notice that JADE calls automatically the register and deregister methods with the default AMS respectively before calling Agent.setup() method and just after Agent.takeDown() method returns; so there is no need for a normal programmer to call them. However, under certain circumstances, a programmer might need to call its methods. To give some examples: when an agent wishes to register with the AMS of a remote agent platform, or when an agent wishes to modify its description by adding a private address to the set of its addresses, ...

    It includes methods to register, deregister, modify and search with an AMS. Each of this method has version with all the needed parameters, or with a subset of them where, those parameters that can be omitted have been defaulted to the default AMS of the platform, the AID of the sending agent, the default Search Constraints. Notice that all these methods blocks every activity of the agent until the action (i.e. register/deregister/modify/search) has been successfully executed or a jade.domain.FIPAException exception has been thrown (e.g. because a FAILURE message has been received by the AMS). In some cases, instead, it is more convenient to execute this task in a non-blocking way. The method getNonBlockingBehaviour() returns a non-blocking behaviour of type RequestFIPAServiceBehaviour that can be added to the queue of the agent behaviours, as usual, by using Agent.addBehaviour().
    The MIDP version of this class only includes the getFailedReceiver() method.

    Version:
    $Date$ $Revision$
    Author:
    Fabio Bellifemine - CSELT S.p.A.