vs.rationalagent.behaviour
Class ReceiveBehaviour

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.SimpleBehaviour
          extended by vs.rationalagent.behaviour.ReceiveBehaviour
All Implemented Interfaces:
java.io.Serializable

Deprecated. ReceiveBehaviour: a more user friendly ReceiverBehaviour Creation: new ReceiveBehaviour(Agent, Timeout (or -1), MessageTemplate ) - terminates when 1) desired message is received OR timeout expires - on termination, handle(msg) is called ( J.Vaucher sept. 7 2003 ) http://www.iro.umontreal.ca/~vaucher/Agents/Jade/primer6.html

@Deprecated
public abstract class ReceiveBehaviour
extends jade.core.behaviours.SimpleBehaviour

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jade.core.behaviours.Behaviour
STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
ReceiveBehaviour(jade.core.Agent a, int millis, jade.lang.acl.MessageTemplate mt)
          Deprecated. Constructor
 
Method Summary
 void action()
          Deprecated. Called when behaviour is active
 boolean done()
          Deprecated. Action is done when finished = true
 jade.lang.acl.ACLMessage getMessage()
          Deprecated. Gets the message
abstract  boolean handle(jade.lang.acl.ACLMessage msg)
          Deprecated. Defines how to handle this message.
 void onStart()
          Deprecated. Called when behaviour starts
 void reset()
          Deprecated.  
 void reset(int dt)
          Deprecated.  
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, isRunnable, onEnd, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceiveBehaviour

public ReceiveBehaviour(jade.core.Agent a,
                        int millis,
                        jade.lang.acl.MessageTemplate mt)
Deprecated. 
Constructor

Parameters:
a - The agent of this Behaviour
millis - timeout (-1 if no timeout)
mt - Message Template for message to receive
Method Detail

action

public void action()
Deprecated. 
Called when behaviour is active

Specified by:
action in class jade.core.behaviours.Behaviour

done

public boolean done()
Deprecated. 
Action is done when finished = true

Specified by:
done in class jade.core.behaviours.Behaviour

getMessage

public jade.lang.acl.ACLMessage getMessage()
Deprecated. 
Gets the message

Returns:
the ACLMessage

handle

public abstract boolean handle(jade.lang.acl.ACLMessage msg)
Deprecated. 
Defines how to handle this message.

Parameters:
msg - the received ACL message, or null if time out
Returns:
whether the ACL message was handled. I.e. if it was put back, this method should return false.

onStart

public void onStart()
Deprecated. 
Called when behaviour starts

Overrides:
onStart in class jade.core.behaviours.Behaviour

reset

public void reset()
Deprecated. 
Overrides:
reset in class jade.core.behaviours.SimpleBehaviour

reset

public void reset(int dt)
Deprecated.