| | |
| | | @Service |
| | | @Slf4j(topic = "tube") |
| | | @Order(3) |
| | | public class TubeAlarmService implements ApplicationRunner { |
| | | public class TubeAlarmService { |
| | | @Resource |
| | | NettyUdpServer nettyUdpServer; |
| | | |
| | |
| | | private Integer udpPort; |
| | | @Value("${spring.netty.udp.enabled}") |
| | | private String UdpServerEnable; |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | if (UdpServerEnable.equals("false")) { |
| | | return; |
| | | } |
| | |
| | | String start = messages[0]; |
| | | String host = messages[1]; |
| | | String tubeId = messages[2]; |
| | | String alarmTime = DateUtils.convertDate(messages[3],"yyyy/M/d H:m:s"); |
| | | String alarmTime = DateUtils.convertDate(messages[3], "yyyy/M/d H:m:s"); |
| | | String position = messages[4]; |
| | | String type = messages[5]; |
| | | String watcher = messages[6]; |