Package jade.proto

Class SSResponderDispatcher

  • All Implemented Interfaces:
    Serializable, Serializable

    public abstract class SSResponderDispatcher
    extends CyclicBehaviour
    This behaviour is designed to be used together with the Single-Session responder protocol classes. More in details it is aimed at dealing with protocol initiation messages and dispatching them to responders. The latter are created by means of the createResponder() abstract method that developers must implement.
    Author:
    Giovanni Caire
    See Also:
    SSContractNetResponder, SSIteratedContractNetResponder, SSIteratedAchieveREtResponder, Serialized Form
    • Method Detail

      • action

        public final void action()
        Description copied from class: Behaviour
        Runs the behaviour. This abstract method must be implemented by Behavioursubclasses to perform ordinary behaviour duty. An agent schedules its behaviours calling their action() method; since all the behaviours belonging to the same agent are scheduled cooperatively, this method must not enter in an endless loop and should return as soon as possible to preserve agent responsiveness. To split a long and slow task into smaller section, recursive behaviour aggregation may be used.
        Specified by:
        action in class Behaviour
        See Also:
        CompositeBehaviour
      • createResponder

        protected abstract Behaviour createResponder​(ACLMessage initiationMsg)
        This method is responsible for creating a suitable Behaviour acting as responder in the interaction protocol initiated by message initiationMsg.
        Parameters:
        initiationMsg - The message initiating the interaction protocol
        Returns:
      • addBehaviour

        protected void addBehaviour​(Behaviour b)