Next: Sending FutureMessages
Up: Communication Services
Previous: Moving an Agent
  Contents
When an Agent wants to send a message it first requests an AgentCommProxy.
It then calls the method sendMessage on this proxy which wraps the
method to the communication service. Like with the move method the
CommService will call the method executeMessage directly on the remote
communication service or through its output proxy. The target communication
service looks up the AgentLoader for the target Agent by calling the getLoader
on its helper and then asks the AgentLoader to invoke the
message on the target Agent. All method calls up to here are blocked until the
target Agent returns the result of the message invocation. The return goes the
same way back. When an exception occurs it will be given through to the local
communication service which wraps them to the two thrown exception AgentNotFoundException
and SecurityException. It uses a similar exception handling like the
RemoteException of RMI which can contain a nested, different exception.
Thomas Letsch
2001-02-21