| | |
| | | @Component |
| | | public class ServerBootstrap { |
| | | |
| | | private static boolean initThread = false; |
| | | |
| | | @Autowired |
| | | private MainProcess mainProcess; |
| | | @Autowired |
| | |
| | | |
| | | @Async |
| | | public void init() throws InterruptedException { |
| | | if (initThread) { |
| | | return; |
| | | } |
| | | News.info("核心控制层开始初始化..............................................."); |
| | | clearStartupRuntimeLocks(); |
| | | // 初始化消息队列 |
| | |
| | | initThread(); |
| | | // 开始主流程进程 |
| | | mainProcess.start(); |
| | | initThread = true; |
| | | News.info("核心控制层已启动..............................................."); |
| | | } |
| | | |
| | |
| | | thread = new ZyStationThread(deviceConfig, redisUtil); |
| | | } else if (deviceConfig.getThreadImpl().equals("ZyStationV3Thread")) { |
| | | thread = new ZyStationV3Thread(deviceConfig, redisUtil); |
| | | } else if (deviceConfig.getThreadImpl().equals("ZyStationV4Thread")) { |
| | | thread = new ZyStationV4Thread(deviceConfig, redisUtil); |
| | | } else if (deviceConfig.getThreadImpl().equals("ZyStationV5Thread")) { |
| | | thread = new ZyStationV5Thread(deviceConfig, redisUtil); |
| | | } else { |