jade.core.behaviours
Class SenderBehaviour

java.lang.Object
  |
  +--jade.core.behaviours.Behaviour
        |
        +--jade.core.behaviours.SimpleBehaviour
              |
              +--jade.core.behaviours.OneShotBehaviour
                    |
                    +--jade.core.behaviours.SenderBehaviour

public final class SenderBehaviour
extends OneShotBehaviour

Behaviour for sending an ACL message. This class encapsulates a send() as an atomic operation. This behaviour sends a given ACL message and terminates.

Version:
$Date: 2002/05/29 09:55:32 $ $Revision: 2.1 $
Author:
Giovanni Rimassa - Universita` di Parma
See Also:
ReceiverBehaviour, Agent.send(ACLMessage msg), ACLMessage, Serialized Form

Inner classes inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
SenderBehaviour(Agent a, ACLMessage msg)
          Send a given ACL message.
 
Method Summary
 void action()
          Actual behaviour implementation.
 
Methods inherited from class jade.core.behaviours.OneShotBehaviour
done
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getBehaviourName, getDataStore, handle, 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

SenderBehaviour

public SenderBehaviour(Agent a,
                       ACLMessage msg)
Send a given ACL message. This constructor creates a SenderBehaviour which sends an ACL message.
Parameters:
a - The agent this behaviour belongs to, and that will send() the message.
msg - An ACL message to send.
Method Detail

action

public void action()
Actual behaviour implementation. This method sends an ACL message, using either the given AgentGroup or the :receiver message slot to get the message recipient names.
Overrides:
action in class Behaviour
Tags copied from class: Behaviour
See Also:
CompositeBehaviour