jade.proto
Class SSResponderDispatcher

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.SimpleBehaviour
          extended by jade.core.behaviours.CyclicBehaviour
              extended by jade.proto.SSResponderDispatcher
All Implemented Interfaces:
java.io.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

Field Summary
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent
 
Constructor Summary
SSResponderDispatcher(Agent a, MessageTemplate tpl)
           
 
Method Summary
 void action()
          Runs the behaviour.
protected  void addBehaviour(Behaviour b)
           
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.
 
Methods inherited from class jade.core.behaviours.CyclicBehaviour
done
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
Methods inherited from class jade.core.behaviours.Behaviour
block, block, getBehaviourName, getDataStore, getParent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSResponderDispatcher

public SSResponderDispatcher(Agent a,
                             MessageTemplate tpl)
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)


These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions