作者: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
另,作爲補充,如果端口不爲默認,則需要做如下改動:
...
Properties pp = new Properties();
pp.setProperty(Profile.MAIN, "false");
pp.setProperty(Profile.PORT, "1100");
JadeGateway.init(..., pp);
另參考代碼
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);
}