Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed some static variables.

  • Loading branch information...
commit 2b0ea0e15061d45e04470050bd5231dbad9b650c 1 parent 97db750
Muki authored
View
7 ...dbs.medmon.sensor.core/src/de/lmu/ifi/dbs/medmon/sensor/core/ISensorDirectoryService.java
@@ -11,10 +11,11 @@
*/
public interface ISensorDirectoryService {
- public static final String SENSOR_TOPIC_CHANGED = "medmon/sensor/core/sensor/changed";
+ public static final String SENSOR_TOPIC = "medmon/sensor/core/sensor/*";
+ public static final String SENSOR_TOPIC_ADD = "medmon/sensor/core/sensor/add";
+ public static final String SENSOR_TOPIC_REMOVE = "medmon/sensor/core/sensor/remove";
- public static final String SENSOR_PROPERTY_ADD = "medmon.sensor.core.sensor.added";
- public static final String SENSOR_PROPERTY_REMOVED = "medmon.sensor.core.sensor.removed";
+ public static final String SENSOR_DATA = "medmon.sensor.core.sensor";
public List<ISensor> getSensors();
View
8 ...on.sensor.core/src/de/lmu/ifi/dbs/medmon/sensor/core/internal/SensorDirectoryService.java
@@ -37,18 +37,18 @@ protected void activate() {
protected void bindSensor(ISensor sensor) {
sensors.put(sensor.getId(), sensor);
HashMap<String, Object> properties = new HashMap<>();
- properties.put(SENSOR_PROPERTY_ADD, sensor);
+ properties.put(SENSOR_DATA, sensor);
properties.put("org.eclipse.e4.data", sensor); //This is for e4
- eventAdmin.postEvent(new Event(SENSOR_TOPIC_CHANGED, properties));
+ eventAdmin.postEvent(new Event(SENSOR_TOPIC_ADD, properties));
log.debug("Added sensor " + sensor.getId());
}
protected void unbindSensor(ISensor sensor) {
sensors.remove(sensor.getId());
HashMap<String, Object> properties = new HashMap<>();
- properties.put(SENSOR_PROPERTY_REMOVED, sensor);
+ properties.put(SENSOR_DATA, sensor);
properties.put("org.eclipse.e4.data", sensor); //This is for e4
- eventAdmin.postEvent(new Event(SENSOR_TOPIC_CHANGED, properties));
+ eventAdmin.postEvent(new Event(SENSOR_TOPIC_REMOVE, properties));
log.debug("Removed sensor " + sensor.getId());
}
Please sign in to comment.
Something went wrong with that request. Please try again.