Author: Giovanni Caire (TILab S.p.a)
This example shows a mobile agent, which is able to migrate or clone across multiple network hosts. In this version of JADE only intra-platform mobility is supported. An agent can navigate across different agent containers but is confined to a single JADE platform (see the programmer's guide for more details on Agent Mobility).
To launch this examples, the user can activate the main container (java jade.Boot -gui), several agent containers (java jade.Boot -container) and then start MobileAgent from command line (java jade.Boot -container mobile:examples.mobile.MobileAgent).Through the agent's GUI it is possible to select the location (i.e. container) on which move or clone the agent.
The agent is also able to serve requests from other agents. In particular it must receive a REQUEST ACLMessage with one of the following contents:
|This class contains the two resources used by the agent behaviours: the counter cnt and the flag cntEnabled. At the setup it adds two behaviours to serve the incoming messages and to increment the counter. In particular, notice the usage of the two methods beforeMove() and afterMove() to execute some application-specific tasks just before and just after the agent migration takes effect.|
|Jade classes used:|
is a trademark of TILAB (formerly CSELT).
JADE has been developed jointly by TILAB (formerly CSELT) and the Computer Engineering Group of the University of Parma