views:

103

answers:

1

I have a website at the back end of which I have a JADE main container running. Multiple machines can register with this main container. So, I want to know if the JADE API supports getting the IP addresses of all the agents currently registered with the Main container? I have to eventually display this information on the website.

Thanks...

A: 

You're probably right about the JADE API, but of course you can always use standard Java to find the local IP address - try InetAddress.getLocalHost(). An Agent pushed from the Main Container when each container connects could use this to report the IP address of each container, and an Agent in the Main Container could subscribe to these messages and display them on the website. IIRC you can subscribe to the AMS and receive notification when new containers come online.

dan
Thanks for replying dan... That's almost exactly what I eventually did. The main container a send message to all the currently registered agents asking for the their IP address, and the get their own IP address by InetAddress.getLocalHost() and send reply message with it..
Tushar M