The communication services need some methods from the System to transport Agents
and transfer messages. Since these are special to the behavior of the communication
services, please consult the Section
![[*]](/usr/share/latex2html/icons/crossref.png)
on page
![[*]](/usr/share/latex2html/icons/crossref.png)
for a more detailed description of the methods.
When an Agent requests to be sent to another Agent System it calls the
move
method of the communication service. To get the Agent in a safe state the communication
service calls the
prepareForMove of the platform.
The platform then stops the Agent and returns a reference to it. When the transfer
was OK it calls the method
transferOK of the System
which terminates the Agent because it now executes in the other Agent System.
The last method,
receiveAgent, is called when
a communication service gets a request to receive and restart an Agent from
outside. This method checks first if the Agent is allowed to execute here and
then creates it a new
AgentLoader and
AgentHelper.
If all went OK, it is restarted and put into the
agents Hashtable.