15490289 at sun.ac.za (Claassen, M, Mnr )
2014-08-03 12:25:31 UTC
Hello all,
I have a funny behaviour in my program..
I have a Task Agent which implements a class that extends the ContractNetResponder Class to handle communication with a Product Agent. This class obviously implement a handleCfp callback function in my program.
The Task Agent also implements a 'ServiceNotifier' class that extends the DFSubscriber class. This class implements the standard onRegister and onDeregister functions so that my Task Agent can be notified immediately when a certain service (supplied by some Resource Agents) becomes available in the Directory Facilitator.
So...when I launch a Resource agent with a certain service....it indeed sends a message with the INFORM performative to my Task Agent. (Checked this through the sniffer). This is where the problem comes in...the onRegister function of the ServiceNotifier class is not invoked....instead the handleCfp function of the ContractNetResponder class is invoked. I checked through the sniffer that no cfp is sent to the Task Agent.
The funny thing though is that when I launch another Resource Agent with the same service.....the onRegister function is invoked?
I am clearly doing something wrong. Any help from the experts out there would greatly be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140803/cdeeceb4/attachment.html>
I have a funny behaviour in my program..
I have a Task Agent which implements a class that extends the ContractNetResponder Class to handle communication with a Product Agent. This class obviously implement a handleCfp callback function in my program.
The Task Agent also implements a 'ServiceNotifier' class that extends the DFSubscriber class. This class implements the standard onRegister and onDeregister functions so that my Task Agent can be notified immediately when a certain service (supplied by some Resource Agents) becomes available in the Directory Facilitator.
So...when I launch a Resource agent with a certain service....it indeed sends a message with the INFORM performative to my Task Agent. (Checked this through the sniffer). This is where the problem comes in...the onRegister function of the ServiceNotifier class is not invoked....instead the handleCfp function of the ContractNetResponder class is invoked. I checked through the sniffer that no cfp is sent to the Task Agent.
The funny thing though is that when I launch another Resource Agent with the same service.....the onRegister function is invoked?
I am clearly doing something wrong. Any help from the experts out there would greatly be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140803/cdeeceb4/attachment.html>