@Override public void updateSensorData(SensorJob sensorJob, String priority) { if (sensorJobExecutor == null) { sensorJobExecutor = new SensorJobExecutor(connMan); this.sensorJobExecutor.startExecutor(); } if (sensorJob != null && priority != null) { if (priority.contains(Config.REFRESH_PRIORITY_HIGH)) { sensorJobExecutor.addHighPriorityJob(sensorJob); } else if (priority.contains(Config.REFRESH_PRIORITY_MEDIUM)) { sensorJobExecutor.addMediumPriorityJob(sensorJob); } else if (priority.contains(Config.REFRESH_PRIORITY_LOW)) { sensorJobExecutor.addLowPriorityJob(sensorJob); } else { System.err.println("Sensor data update priority do not exist! Please check the input!"); return; } logger.debug( "Add new sensorJob {} with priority: {} to sensorJobExecuter", sensorJob.toString(), priority); } }