Commit c2afd6e6 by 向延琳

Merge branch 'develop' of http://192.168.3.233:8090/eshiled-new/ne-shield-devicemonitor into develop

2 parents 3cd1974e 15523b89
package cn.com.glsx.test;
import Ice.ObjectPrx;
import cn.com.glsx.devicemonitor.iceprotocol.resident.FspServicePrx;
import cn.com.glsx.devicemonitor.iceprotocol.resident.FspServicePrxHelper;
import lombok.extern.slf4j.Slf4j;
/**
* @author Yanglinlong
* @date 2022/1/15 17:09
*/
@Slf4j
public class ICETest {
public static void main(String[] args) {
boolean init = false;
try {
String host = "192.168.3.101";
String port = "30060";
String arrayHost[] = {host, port};
Ice.Communicator ic = Ice.Util.initialize(arrayHost);
String lbsPxyStr = "FspService:default -h " + host + " -p " + port;
log.info("常驻地调用地址1:" + lbsPxyStr);
ObjectPrx base = ic.stringToProxy(lbsPxyStr);
log.info("常驻地调用地址2:" + lbsPxyStr);
FspServicePrx fspServicePrx = FspServicePrxHelper.checkedCast(base);
if (null == fspServicePrx) {
log.info("Invalid proxy");
} else {
init = true;
log.info("Query Resident Ice Init Success!");
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("init = " + init);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!