RE: [jade-develop] How do I block all subsequent behaviours whilst myagent receives a number of incoming messages?


Subject: RE: [jade-develop] How do I block all subsequent behaviours whilst myagent receives a number of incoming messages?
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Tue Mar 18 2003 - 14:47:37 MET


Hi,
 
You can call 8 times the blockingReceive() method of the Agent class. This method blocks all agent activities until a message is received.
 
Bye
 
Giovanni

-----Original Message-----
From: Steve [mailto:steven_george@hotmail.com]
Sent: marted́ 18 marzo 2003 14.07
To: jade-develop@sharon.cselt.it
Subject: [jade-develop] How do I block all subsequent behaviours whilst myagent receives a number of incoming messages?

Hi Jaders

 

Im trying to understand agent behaviours and have come across a problem...

 

I send about 8 messages to an agent. It is vital that the agent receive all 8 messages before it does anything else. I need a way of blocking all subsequent behaviours until all messages have arrived and their content data stored. Is there an elegant way of doing this? So far I call my receiver behaviour (SimpleBehaviour()) 8 times. It works but I am sure this is not the best approach.

 

Any help would be much appreciated

 

PS. Many thanks to James and David for the previous help

 

Steve.
 

Hi,
 
You can call 8 times the blockingReceive() method of the Agent class. This method blocks all agent activities until a message is received.
 
Bye
 
Giovanni
-----Original Message-----
From: Steve [mailto:steven_george@hotmail.com]
Sent: marted́ 18 marzo 2003 14.07
To: jade-develop@sharon.cselt.it
Subject: [jade-develop] How do I block all subsequent behaviours whilst myagent receives a number of incoming messages?

Hi Jaders

 

Im trying to understand agent behaviours and have come across a problem... 

 

I send about 8 messages to an agent. It is vital that the agent receive all 8 messages before it does anything else.  I need a way of blocking all subsequent behaviours until all messages have arrived and their content data stored.  Is there an elegant way of doing this?  So far I call my receiver behaviour (SimpleBehaviour()) 8 times.  It works but I am sure this is not the best approach.

 

Any help would be much appreciated

 

PS.  Many thanks to James and David for the previous help

 

Steve.  
 

_______________________________________________
jade-develop mailing list
jade-develop@sharon.cselt.it
http://sharon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT http://jade.cselt.it/mailing.htm#unsubscribe



This archive was generated by hypermail 2a22 : Tue Mar 18 2003 - 14:48:00 MET