behaviours


Subject: behaviours
From: Alexander Osherenko (a.ocherenko@gmx.de)
Date: Tue Oct 01 2002 - 11:49:33 MET DST


Hello,

how could I solve the problem of forwarding messages if I have several behaviours that call the blockingReceive method and each behaviour waits for a specific message?

For example:

class Behaviour1 {
    ...
    void action() {
        ACLMessage msg = blockingReceive();
        ...
        if (messageToken instanceof dummy1) {
            ....
        }
    }
}

class Behaviour2 {
    ...
    void action() {
        ACLMessage msg = blockingReceive();
        ...
        if (messageToken instanceof dummy2) {
            ....
        }
    }
}

The problem is that the original message which is defined for Behaviour2 would be processed by the Behaviour1.

Cheers

Alexander

Hello,
 
how could I solve the problem of forwarding messages if I have several behaviours that call the blockingReceive method and each behaviour waits for a specific message?
 
For example:
 
class Behaviour1 {
    ...
    void action() {
        ACLMessage msg = blockingReceive();
        ...
        if (messageToken instanceof dummy1) {
            ....
        }
    }
}
 
class Behaviour2 {
    ...
    void action() {
        ACLMessage msg = blockingReceive();
        ...
        if (messageToken instanceof dummy2) {
            ....
        }
    }
}
 
The problem is that the original message which is defined for Behaviour2 would be processed by the Behaviour1.
 
Cheers
 
Alexander



This archive was generated by hypermail 2a22 : Tue Oct 01 2002 - 11:41:04 MET DST