ibspan.tss.core.signal
Class SignalDispatcher
java.lang.Object
jade.core.behaviours.Behaviour
jade.core.behaviours.SimpleBehaviour
jade.core.behaviours.CyclicBehaviour
ibspan.tss.core.signal.SignalDispatcher
- All Implemented Interfaces:
- Serializable
public class SignalDispatcher
- extends CyclicBehaviour
Forwards external events as internal signals to local
listening behaviours. External event can be either ACL Message from other agent
or event generated by the agent itself). This class should not be used
directly by the agent. Instead of that agent is provided with
SignalDispatchersManager
class.
- Author:
- Maciej Gawinecki
- See Also:
- Serialized Form
Methods inherited from class jade.core.behaviours.Behaviour |
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, handle, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SignalDispatcher
public SignalDispatcher(Agent a,
MessageTemplate external)
- Constructs SignalDispatcher.
- Parameters:
a
- external
- External message template invoking this dispatcher
action
public void action()
- Specified by:
action
in class Behaviour
registerListener
public MessageTemplate registerListener(Behaviour listener,
boolean mortal)
- Registers listening behaviours for the event this dispatcher receives.
- Parameters:
listener
- listening behaviourmortal
- if true then after forwarding one event listener will not
receive it more; this means it has register again, if willing
to catch this event again.
- Returns:
- message template matching incoming internal event