| | |
| | | package com.whyc.webSocket; |
| | | |
| | | import com.whyc.config.WebSocketConfig; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.factory.ThreadPoolExecutorFactory; |
| | | import com.whyc.pojo.RtState; |
| | | import com.whyc.pojo.StationInf; |
| | | import com.whyc.service.*; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpSession; |
| | | import javax.websocket.*; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.CountDownLatch; |
| | | import java.util.concurrent.ThreadPoolExecutor; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * packageName com.whyc.websocket |
| | |
| | | * @version JDK 8 |
| | | * @className BattSocket (此处以class为例) |
| | | * @date 2024/6/15 |
| | | * @description TODO |
| | | * @description |
| | | */ |
| | | @Component |
| | | @ServerEndpoint(value = "/batt", encoders = WebSocketEncoder.class) |