Package jade.proto

Class SSIteratedContractNetResponder

    • Field Detail

      • INITIATION_KEY

        public final String INITIATION_KEY
        Key to retrieve from the DataStore of the behaviour the initiation ACLMessage that triggered this responder session
      • RECEIVED_KEY

        public final String RECEIVED_KEY
        Key to retrieve from the DataStore of the behaviour the last received ACLMessage
      • REPLY_KEY

        public final String REPLY_KEY
        Key to set into the DataStore of the behaviour the new ACLMessage to be sent back to the initiator as a reply.
    • Constructor Detail

      • SSIteratedContractNetResponder

        public SSIteratedContractNetResponder​(Agent a,
                                              ACLMessage cfp)
      • SSIteratedContractNetResponder

        public SSIteratedContractNetResponder​(Agent a,
                                              ACLMessage cfp,
                                              DataStore store)
        Construct a SSIteratedContractNetResponder that is activated by the reception of a given initiation CFP message and uses a given DataStore.
    • Method Detail

      • beforeReply

        protected void beforeReply​(ACLMessage reply)
        This method can be redefined by protocol specific implementations to customize a reply that is going to be sent back to the initiator. This default implementation does nothing.
        Overrides:
        beforeReply in class SSContractNetResponder
      • afterReply

        protected void afterReply​(ACLMessage reply)
        This method can be redefined by protocol specific implementations to update the status of the protocol just after a reply has been sent. This default implementation does nothing.
        Overrides:
        afterReply in class SSContractNetResponder
      • onStart

        public void onStart()
        Description copied from class: Behaviour
        This method is just an empty placeholders for subclasses. It is executed just once before starting behaviour execution. Therefore, it acts as a prolog to the task represented by this Behaviour.
        Overrides:
        onStart in class Behaviour
      • registerHandleOutOfSequence

        public void registerHandleOutOfSequence​(Behaviour b)
        This method allows to register a user defined Behaviour in the HANDLE_OUT_OF_SEQ state. This behaviour would override the homonymous method. This method also sets the data store of the registered Behaviour to the DataStore of this current behaviour. The registered behaviour can retrieve the out of sequence ACLMessage object received from the datastore at the RECEIVED_KEY key.
        Parameters:
        b - the Behaviour that will handle this state
      • reset

        public void reset()
        Reset this behaviour.
        Overrides:
        reset in class FSMBehaviour
      • sessionTerminated

        protected void sessionTerminated()
        This method can be redefined by protocol specific implementations to take proper actions after the completion of the current protocol session.
      • registerDSState

        protected void registerDSState​(Behaviour b,
                                       String name)
        Utility method to register a behaviour in a state of the protocol and set the DataStore appropriately