Package jade.domain

Class RequestFIPAServiceBehaviour

  • All Implemented Interfaces:
    Serializable, Serializable

    public class RequestFIPAServiceBehaviour
    extends SimpleAchieveREInitiator
    This class extends the FipaRequestIntiatorBehaviour in order to request an agent, e.g. DF or AMS to perform a specific action.
    This class implements all the abstract method of the super classes, therefore the behaviour can be immediately added to an agent.
    In some cases, it might be usefull to extend this class to override some of its methods and react to the received messages in an application-specific manner.
    The class has two constructor. The first generic constructor can be used for all the action an agent can perform. In the case of a a search action the default search constraints are used.
    The second constructor is specific for a search action and it allows to specify additional search constraints.
    Version:
    $Date$ $Revision$
    Author:
    Fabio Bellifemine (CSELT S.p.A.)
    See Also:
    DFService, AMSService, Serialized Form
    • Constructor Detail

      • RequestFIPAServiceBehaviour

        public RequestFIPAServiceBehaviour​(Agent a,
                                           AID receiver,
                                           String actionName,
                                           Object agentDescription,
                                           SearchConstraints constraints)
                                    throws FIPAException
        Create a behaviour to request an agent to perform a specific action. Using this constructor, is possible to pass all information necessary to request a search operation.
        Parameters:
        a - The agent this behaviour belongs to, i.e. the agent who is interested in the search result.
        receiver - The agent who will be requested to perform the action.
        agentDescription - An agent descriptor used according to the action required.
        constraints - The search contraints for the search action.
        Throws:
        FIPAException - A suitable exception can be thrown when the method locally discovers that the passed parameters are not valid.
        See Also:
        SearchConstraints
    • Method Detail

      • handleNotUnderstood

        protected void handleNotUnderstood​(ACLMessage reply)
        Method to handle not-understood replies.
        Overrides:
        handleNotUnderstood in class SimpleAchieveREInitiator
        Parameters:
        reply - The actual ACL message received. It is of not-understood type and matches the conversation template.
      • handleRefuse

        protected void handleRefuse​(ACLMessage reply)
        Method to handle refuse replies.
        Overrides:
        handleRefuse in class SimpleAchieveREInitiator
        Parameters:
        reply - The actual ACL message received. It is of refuse type and matches the conversation template.
      • handleAgree

        protected void handleAgree​(ACLMessage reply)
        Method to handle agree replies.
        Overrides:
        handleAgree in class SimpleAchieveREInitiator
        Parameters:
        reply - The actual ACL message received. It is of agree type and matches the conversation template.
      • handleFailure

        protected void handleFailure​(ACLMessage reply)
        Method to handle failure replies.
        Overrides:
        handleFailure in class SimpleAchieveREInitiator
        Parameters:
        reply - The actual ACL message received. It is of failure type and matches the conversation template.
      • handleInform

        protected void handleInform​(ACLMessage reply)
        Method to handle inform replies.
        Overrides:
        handleInform in class SimpleAchieveREInitiator
        Parameters:
        reply - The actual ACL message received. It is of inform type and matches the conversation template.
      • handleAllResponses

        protected void handleAllResponses​(Vector reply)
        This method handle is called after receiving all the responses and when the timeout is expired( in this case no reply has been received.
        Overrides:
        handleAllResponses in class SimpleAchieveREInitiator