Commit 896a4e6c by zhouhaibao

[+]代码调整

1 parent 4cc95593
......@@ -27,13 +27,7 @@ public class ShutdownMachineRespHandler implements TcpHandler<ShutdownMachineRes
log.info("枪号:{}", data.getGunNumber());
log.info("停止结果:{}", data.getShutdownResult());
log.info("失败原因:{}", data.getFailureReason());
String key = ProxyHelper.setCallback(shutdownMachineResp, channel);
TcpCallback<TcpRsp> callback = ProxyHelper.getCallback(key);
if (Objects.nonNull(callback)) {
callback.callback(shutdownMachineResp);
} else {
log.info("callback为空===StartMachineRespHandler");
}
ProxyHelper.setCallback(channel,shutdownMachineResp);
return null;
}
}
......@@ -31,13 +31,7 @@ public class StartMachineRespHandler implements TcpHandler<StartMachineResp, Sta
data.setGunNumber((byte) 1);
data.setFailureReason((byte) 0);
resp.setData(data);
String key = ProxyHelper.setCallback(startMachineResp, channel);
TcpCallback<TcpRsp> callback = ProxyHelper.getCallback(key);
if (Objects.nonNull(callback)) {
callback.callback(startMachineResp);
} else {
log.info("callback为空===StartMachineRespHandler");
}
ProxyHelper.setCallback(channel,startMachineResp);
return null;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!