Next: Communication and Messages
Up: Technology
Previous: Server Architecture
  Contents
Figure 4.3:
Transfer of an agent between from one server to another.
|
Figure 4.3 gives a brief overview on how an agent
is transfered from one server to the other. The neccessary actions
are performed by the KaaribogaBase class and the agent itself.
For a more detailed view let's assume base1 wants to send an agent
to base2. This involves the following steps.
- base1 calls the kaariboga's onDispatch() method and stops it's thread.
- base1 sends a KAARIBOGA message to base2 which includes the agent's internal state.
- base2 checks if it has access to the java byte code of the class. If not it sends a
GET_CLASS message to base1.
- If base1 receives a GET_CLASS message it sends a CLASS message including the byte
code of the requested class.
- base2 initializes the class, calls the kaariboga's onArrival() method and starts it's thread.
Dirk
2002-09-01