jade.core.behaviours
Interface ReceiverBehaviour.Handle

Enclosing class:
ReceiverBehaviour

public static interface ReceiverBehaviour.Handle

An interface representing ACL messages due to arrive within a time limit. This interface is used to create a ReceiverBehaviour object to receive an ACL message within a user specified time limit. When the user tries to read the message represented by the handle, either gets it or gets an exception.

See Also:
ReceiverBehaviour.newHandle(), ReceiverBehaviour.ReceiverBehaviour(Agent a, ReceiverBehaviour.Handle h, long millis)

Method Summary
 ACLMessage getMessage()
          Tries to retrieve the ACLMessage object represented by this handle.
 

Method Detail

getMessage

public ACLMessage getMessage()
                      throws ReceiverBehaviour.TimedOut,
                             ReceiverBehaviour.NotYetReady
Tries to retrieve the ACLMessage object represented by this handle.
Returns:
The ACL message, received by the associated ReceiverBehaviour, if any.
Throws:
TimedOut - If the associated ReceiverBehaviour did not receive a suitable ACL message within the time limit.
NotYetReady - If the associated ReceiverBehaviour is still waiting for a suitable ACL message to arrive.
See Also:
ReceiverBehaviour.ReceiverBehaviour(Agent a, ReceiverBehaviour.Handle h, long millis)