@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void onEvent(SensorEvent<Object> event) { // propagate upwards Sensor<?> sourceSensor = event.getSensor(); Sensor<?> destinationSensor = getDestinationSensor(sourceSensor); if (!sensorFilter.apply(sourceSensor)) { return; // ignoring excluded sensor } if (LOG.isTraceEnabled()) LOG.trace("enricher {} got {}, propagating via {}{}", new Object[] {this, event, entity, (sourceSensor == destinationSensor ? "" : " (as "+destinationSensor+")")}); emit((Sensor)destinationSensor, event.getValue()); }