//package com.keystar.plane.inspection.websocket;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//
//import com.keystar.plane.inspection.service.DeviceService;
//import lombok.extern.slf4j.Slf4j;
//import org.java_websocket.handshake.ServerHandshake;
//import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
//
//import java.net.URI;
//import java.util.Map;
//
//@Slf4j
//public class DeviceWebsocketClient extends BaseWebsocketClient{
//
//    private static final String clientName = "deviceWebsocketClient";
//    /*这个订阅格式是实现约定好的，可以具体情况具体分析*/
//    private String sendStr = "/70ddc6e4-1b3e-4da9-9952-16c04ec5c415/status/media";
//
//    public DeviceWebsocketClient(URI serverUri, Map<String, String> httpHeaders, ThreadPoolTaskExecutor workPoolScheduler, DeviceService deviceService) {
//        super(serverUri, httpHeaders, clientName, workPoolScheduler);
//    }
//
//    public DeviceWebsocketClient(URI serverUri){
//        super(serverUri);
//    }
//
//    @Override
//    public void onOpen(ServerHandshake serverHandshake) {
//        log.info("--------打开连接-------");
////        this.send(sendStr);
//        setConnectState(true);
//    }
//
//    @Override
//    public void onMessage(String msg) {
//        log.info("-------收到消息---------");
//        // 收到消息
//        System.out.println("收到的消息："+ msg);
//
//
//
//    }
//}
