Non-Agent與Agent之間的通信

作者:Kelemen Viktor
原帖地址:http://avalon.tilab.com/pipermail/jade-develop/2006q4/009553.html

原文如下:
Dear Jaders
I made a short description about how i used the JadeGateway class.
It covers a quite simple servlet-agents example.
Its pdf file located here:
   http://people.inf.elte.hu/kelemen/jade/SimpleGatewayAgent.pdf
and the source files:
   http://people.inf.elte.hu/kelemen/jade/SimpleGatewayAgent_source.zip
I hope it would be helpful....
Best regards
  Viktor Kelemen

另,作爲補充,如果端口不爲默認,則需要做如下改動:

import jade.util.leap.Properties; 
... 

Properties pp 
= new Properties(); 
pp.setProperty(Profile.MAIN, 
"false"); 
pp.setProperty(Profile.PORT, 
"1100"); 
JadeGateway.init(..., pp); 

另參考代碼

public static void main(String[] args) 
        BasicProperties p 
= new BasicProperties(); 
        p.setProperty(
"platform-id","hostFQDN:1099/JADE"); 
        p.setBooleanProperty(
"main"true); 
        p.setProperty(
"mainURL","http://hostFQDN:7778/acc"); 
        jade.wrapper.gateway.JadeGateway.init(
"MyGateWayAgent", p); 
}
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章