etfServiceTracker.open();
// SerializationHandler are responsible to handle serialization of Event properties
shServiceTracker = new ServiceTracker(this.context, SerializationHandler.class, new ServiceTrackerCustomizer() {
public Object addingService(ServiceReference reference) {
final SerializationHandler sh = (SerializationHandler) context.getService(reference);
topic2serializationHandler.put(sh.getTopic(), sh);
return sh;
}
public void modifiedService(ServiceReference reference,
Object service) {
// nop
}
public void removedService(ServiceReference reference,
Object service) {
final SerializationHandler sh = (SerializationHandler) service;
topic2serializationHandler.remove(sh.getTopic());
}
});
shServiceTracker.open();
}