Commit 23797f49 authored by AfirSraftGarrier's avatar AfirSraftGarrier

格式并加些打印

parent 4de2d7fa
......@@ -11,7 +11,6 @@ import org.springframework.stereotype.Component;
@Component
@Slf4j
public class DeviceClientLicenseEventHandler {
@Autowired
DeviceManager deviceManager;
@Autowired
......@@ -33,10 +32,6 @@ public class DeviceClientLicenseEventHandler {
} else {
session.getClientChannel().writeAndFlush(protocol);
log.debug("device client license success ...");
}
}
}
......@@ -20,7 +20,7 @@ public class ForwardConnectionListener extends BaseConnectionListener {
public void operationComplete(ChannelFuture channelFuture) {
AlarmService alarmService = SpringUtil.getBean(AlarmService.class);
if (!channelFuture.isSuccess()) {
//TODO 失败进行告警
// 失败进行告警
log.debug("桥接客户端,连接服务器失败:{},{},{}", this.host, this.port, this.appId);
int typeId = 1;
......@@ -28,8 +28,7 @@ public class ForwardConnectionListener extends BaseConnectionListener {
String content = "连接服务器:" + this.host + ":" + this.port + "失败";
alarmService.addAlarm(typeId, title, content);
//TODO forward client连接失败,则强制踢掉设备客户端
// forward client连接失败,则强制踢掉设备客户端
DeviceClientBeForcedOfflineEvent deviceClientBeForcedOfflineEvent = new DeviceClientBeForcedOfflineEvent();
deviceClientBeForcedOfflineEvent.setAppId(this.appId);
EventPublisher eventPublisher = SpringUtil.getBean(EventPublisher.class);
......@@ -49,7 +48,6 @@ public class ForwardConnectionListener extends BaseConnectionListener {
EventPublisher eventPublisher = SpringUtil.getBean(EventPublisher.class);
eventPublisher.publishEvent(forwardClientConnectEvent);
short stx = 21930;
byte ack = 0x0;
int len = 3;
......@@ -58,7 +56,6 @@ public class ForwardConnectionListener extends BaseConnectionListener {
content[0] = 0x7e;
byte end = 0x1;
DeviceProtocol protocol = new DeviceProtocol(stx, len, cmd, ack, content, end);
......@@ -69,5 +66,4 @@ public class ForwardConnectionListener extends BaseConnectionListener {
eventPublisher.publishEvent(deviceClientLicenseEvent);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment