RE: [jade-develop] Using Agent from a stand-alone-application


Subject: RE: [jade-develop] Using Agent from a stand-alone-application
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Fri Feb 07 2003 - 15:43:09 MET


Hi Alexander,

I simple way to do what you need is that your application passes itself to the agent it has just created using the putO2AObject() method. Then the Agent can call methods of your application.
Another possibility is that your application is a singleton and the agent accesses it through a static method. This is more "dirty", but it works also if your agent needs to move away and then comes back.

Hope this helps,

Giovanni

-----Original Message-----
From: Alexander Buschmann [mailto:felerian@web.de]
Sent: venerdě 7 febbraio 2003 12.38
To: jadedevel
Subject: [jade-develop] Using Agent from a stand-alone-application

Hello Jaders,

I'm trying to write a Java-Application that gets some input from the user and starts an agent. Then it gives the entered informations to the Agent via putO2AObject. After that, the Agent moves to another location, compares the given informations against some rules that are defined in another agent and returns with the corrected data. So well. But now, I want to get the informations from the Agent into my Application and I don't know how to do this. Is there any possiblity, that my Application receives messages? Can the Agent call a function from the Application that has started him?
I don't want to write as Application an GuiAgent, but an stand-alone-Application that starts an Agent only if necessary.

As far as I understand the documentation, the "Using JADE from external Java applications"-possibility is just an API for the "Start new Agent"-command in the JADE-Gui. I would be very happy, if anybody could tell me that there is a way to communicate with the created Agent.

Best Regards,

Alexander Buschmann
______________________________________________________________________________
Werden Sie kreativ! Jetzt HTML-Mails nicht nur schreiben - nein -
GESTALTEN, bei WEB.DE FreeMail! http://freemail.web.de/features/?mc=021141



This archive was generated by hypermail 2a22 : Fri Feb 07 2003 - 15:43:12 MET