next up previous contents
Next: helper.getProxy(String proxyInterface) Up: Resource Access Previous: getMAFFinder()   Contents

getCommunicationService(String agentsystem)

This method returns the communication service that can be used to access the given Agent System. The Systems can provide different protocols making it not an easy task to find the appropriate protocol which is supported by both Systems (the local one and the target one). The is method should be used whenever doing communication. The result can be used more times for the same Agent System since the communication services should not be stopped without important reasons. It returns the reference to the proxy of the communication service to use.

The following lines shows how the example Agent uses this method to move itself to another System:

AgentCommIFace commservice = getCommService(``163.117.139.122/test2'');

if(commservice != null)

  commservice.move(helper.getID(), 

                   new Location(``163.117.139.122/test2''));



Thomas Letsch 2001-02-21