| | |
| | | |
| | | import com.dy.common.mw.UnitAdapterInterface; |
| | | import com.dy.common.mw.UnitInterface; |
| | | import com.dy.common.mw.UnitStartedCallbackInterface; |
| | | import com.dy.common.mw.UnitCallbackInterface; |
| | | import com.dy.common.mw.channel.rmi.RmiFrameWork; |
| | | |
| | | public class RmiClUnit implements UnitInterface { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void start(UnitStartedCallbackInterface callback) throws Exception { |
| | | public void start(UnitCallbackInterface callback) throws Exception { |
| | | System.out.println("Rmi Client模块成功启动"); |
| | | this.doStart(); |
| | | callback.call(null) ; |
| | | } |
| | | |
| | | @Override |
| | | public void stop(UnitStartedCallbackInterface callback) throws Exception { |
| | | public void stop(UnitCallbackInterface callback) throws Exception { |
| | | callback.call(null); |
| | | } |
| | | |
| | |
| | | ServerProperties.sendInterval = rVo.sendInterval ; |
| | | ServerProperties.heartbeatTimes = rVo.heartbeatTimes ; |
| | | ServerProperties.sendTimes = rVo.sendTimes ; |
| | | ServerProperties.sendOverThenCloseConnect = rVo.sendOverThenCloseConnect ; |
| | | log.info("得到配置成功"); |
| | | log.info(" 开始RtuAddr=" + ServerProperties.rtuAddrStart); |
| | | log.info(" 截止RtuAddr=" + ServerProperties.rtuAddrEnd); |
| | |
| | | log.info(" 发送数据间隔=" + ServerProperties.sendTimes); |
| | | log.info(" 每轮次发送心跳次数=" + ServerProperties.heartbeatTimes); |
| | | log.info(" 每RTU上报数据轮次=" + ServerProperties.sendTimes); |
| | | log.info(" 发送完数据后,是否关闭TCP连接(1是,0否)=" + ServerProperties.sendOverThenCloseConnect); |
| | | break ; |
| | | }else{ |
| | | log.error("rmi得到配置失败:json转ResConfigVo为null"); |