next up previous contents
Next: Communication and Messages Up: Technology Previous: Server Architecture   Contents

Agent Transfer

Figure 4.3: Transfer of an agent between from one server to another.
\includegraphics*[13cm, 7cm]{agentTransfer.eps}

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.
  1. base1 calls the kaariboga's onDispatch() method and stops it's thread.
  2. base1 sends a KAARIBOGA message to base2 which includes the agent's internal state.
  3. base2 checks if it has access to the java byte code of the class. If not it sends a GET_CLASS message to base1.
  4. If base1 receives a GET_CLASS message it sends a CLASS message including the byte code of the requested class.
  5. base2 initializes the class, calls the kaariboga's onArrival() method and starts it's thread.


Dirk 2002-09-01