Subject: Re: [jade-develop] Receiving messages
From: Alexander Osherenko (a.ocherenko@gmx.de)
Date: Tue Oct 15 2002 - 12:12:16 MET DST
I think your solution is principally a bigger variant of the blockingReceive method (receive + block). GUI events are not there! Or is it wrong?
----- Original Message -----
From: Volker Lutz
To: Alexander Osherenko
Sent: Tuesday, October 15, 2002 11:43 AM
Subject: AW: [jade-develop] Receiving messages
I have just posted it to the Mailing List...
don't know what was wrong
hi Alexander,
I think I had a similar problem. When I used the receive() Method
my Receiver-Behaviour loops all the time (watch it with the Introspector)
I solved this problem with the block() Method in case of receiving no message.
Here is a part of the code:
class WaitAndReplyBehaviour extends SimpleBehaviour
[...]
public void action()
{
final ACLMessage msg = agentRef.receive();
if(msg != null)
{
agentRef.printReceivedMessage(msg);
[...]
}
else
{
//if no message receipt
block();
}
hope this is a solution for you...
Greetings
vol.
____________________________________________
Volker Lutz
Architur Information Systems GmbH
Plieninger Straße 63 B
70794 Filderstadt
Tel: +49 (0)711 / 707097 - 0
Fax: +49 (0)711 / 707097 - 28
Mail: lutz@architur.de
URL: http://www.architur.de
____________________________________________
Architur stellt auf der SYSTEMS 2002 aus!
Halle B1, Stand B1.333
Wir freuen uns auf Ihren Besuch!
Vereinbaren Sie gleich einen Termin für
die Systems (14.-18.Oktober 2002).
____________________________________________
-----Ursprüngliche Nachricht-----
Von: jade-develop-admin@sharon.cselt.it [mailto:jade-develop-admin@sharon.cselt.it]Im Auftrag von Alexander Osherenko
Gesendet: Dienstag, 15. Oktober 2002 11:36
An: JADE
Betreff: [jade-develop] Receiving messages
Hello!
My question is - Is it possible to make receiving messages more efficient?
If I use blockingReceive in my behaviours, there are problems with event forwarding in GuiAgents.If I use receive there is no blocking and the events are sent to the onGuiEvent method but the system is working strange - it hangs in the action loops and it is difficult to work with it.
Is there any solution for this problem?
Cheers
Alexander
----- Original Message -----From: Volker LutzSent: Tuesday, October 15, 2002 11:43 AMSubject: AW: [jade-develop] Receiving messagesI have just posted it to the Mailing List...don't know what was wronghi Alexander,I think I had a similar problem. When I used the receive() Methodmy Receiver-Behaviour loops all the time (watch it with the Introspector)I solved this problem with the block() Method in case of receiving no message.Here is a part of the code:class WaitAndReplyBehaviour extends SimpleBehaviour[...]public void action()
{
final ACLMessage msg = agentRef.receive();if(msg != null)
{
agentRef.printReceivedMessage(msg);[...]
}
else
{
//if no message receipt
block();
}hope this is a solution for you...Greetingsvol.____________________________________________
Volker Lutz
Architur Information Systems GmbH
Plieninger Straße 63 B
70794 Filderstadt
Tel: +49 (0)711 / 707097 - 0
Fax: +49 (0)711 / 707097 - 28
Mail: lutz@architur.de
URL: http://www.architur.de
____________________________________________
Architur stellt auf der SYSTEMS 2002 aus!
Halle B1, Stand B1.333
Wir freuen uns auf Ihren Besuch!
Vereinbaren Sie gleich einen Termin für
die Systems (14.-18.Oktober 2002).
____________________________________________-----Ursprüngliche Nachricht-----
Von: jade-develop-admin@sharon.cselt.it [mailto:jade-develop-admin@sharon.cselt.it]Im Auftrag von Alexander Osherenko
Gesendet: Dienstag, 15. Oktober 2002 11:36
An: JADE
Betreff: [jade-develop] Receiving messagesHello!My question is - Is it possible to make receiving messages more efficient?If I use blockingReceive in my behaviours, there are problems with event forwarding in GuiAgents.If I use receive there is no blocking and the events are sent to the onGuiEvent method but the system is working strange - it hangs in the action loops and it is difficult to work with it.Is there any solution for this problem?CheersAlexander
This archive was generated by hypermail 2a22 : Tue Oct 15 2002 - 12:12:45 MET DST