package com.hivekion.thread; import com.alibaba.fastjson.JSON; import com.hivekion.Global; import com.hivekion.common.entity.ResponseCmdInfo; import com.hivekion.ws.WsServer; import lombok.extern.slf4j.Slf4j; /** * [类的简要说明] *
* [详细描述,可选] *
* * @author LiDongYU * @since 2025/7/22 */ @Slf4j public class HandleSendThread implements Runnable { @Override public void run() { log.info("HandleSendThread start ....................."); while (!Thread.currentThread().isInterrupted()) { try { log.info("waiting message"); ResponseCmdInfo> response = Global.sendCmdInfoQueue.take(); log.info("send response"); WsServer.sendMessage(response.getScenarioId(), response.getRoom(), JSON.toJSONString(response)); } catch (Exception e) { log.error("error::", e); } } } }