Package jade.proto
Class SSResponderDispatcher
- java.lang.Object
-
- jade.core.behaviours.Behaviour
-
- jade.core.behaviours.SimpleBehaviour
-
- jade.core.behaviours.CyclicBehaviour
-
- jade.proto.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 thecreateResponder()abstract method that developers must implement.- Author:
- Giovanni Caire
- See Also:
SSContractNetResponder,SSIteratedContractNetResponder,SSIteratedAchieveREtResponder, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
-
-
Field Summary
-
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
-
-
Constructor Summary
Constructors Constructor Description SSResponderDispatcher(Agent a, MessageTemplate tpl)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaction()Runs the behaviour.protected voidaddBehaviour(Behaviour b)protected abstract BehaviourcreateResponder(ACLMessage initiationMsg)This method is responsible for creating a suitableBehaviouracting as responder in the interaction protocol initiated by messageinitiationMsg.-
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
actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
-
-
-
-
Constructor Detail
-
SSResponderDispatcher
public SSResponderDispatcher(Agent a, MessageTemplate tpl)
-
-
Method Detail
-
action
public final void action()
Description copied from class:BehaviourRuns the behaviour. This abstract method must be implemented byBehavioursubclasses to perform ordinary behaviour duty. An agent schedules its behaviours calling theiraction()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:
actionin classBehaviour- See Also:
CompositeBehaviour
-
createResponder
protected abstract Behaviour createResponder(ACLMessage initiationMsg)
This method is responsible for creating a suitableBehaviouracting as responder in the interaction protocol initiated by messageinitiationMsg.- Parameters:
initiationMsg- The message initiating the interaction protocol- Returns:
-
addBehaviour
protected void addBehaviour(Behaviour b)
-
-