//package com.ld.igds.protocol.iot.mq;
|
//
|
//import com.ld.igds.protocol.iot.analysis.AnalysisService;
|
//import com.ld.io.api.IoSession;
|
//import lombok.extern.slf4j.Slf4j;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
//import java.util.concurrent.CountDownLatch;
|
//
|
///**
|
// * 报文接受到后处理
|
// */
|
//@Slf4j
|
//public class IotReceiverServer {
|
//
|
// private CountDownLatch latch;
|
//
|
// @Autowired
|
// public IotReceiverServer(CountDownLatch latch) {
|
// this.latch = latch;
|
// }
|
//
|
// @Autowired
|
// private AnalysisService analysisService;
|
//
|
//
|
//
|
// public void onMessage(String message) {
|
// message = message.replaceAll("\"", "");
|
// log.info("-------获取队列信息---" + message);
|
// try {
|
// String[] attr = message.split("_");
|
// String sessionKey = attr[0];
|
// String msg = attr[1];
|
// analysisService.analysis(sessionKey, msg);
|
// } catch (Exception e) {
|
// latch.countDown();
|
// log.error("[IOT--消息队列数据失败,失败信息:{}]", e.getMessage(),e);
|
// }
|
// latch.countDown();
|
// }
|
// public void onLoginMessage(String sessionKey) {
|
// log.info("onLoginMessage:" + sessionKey);
|
// }
|
//
|
//}
|