@Reference(dynamic = true, multiple = true, optional = true) public void addProvider(ObservationProvider<?> provider, Map<String, Object> properties) { String type = parseType(properties); if (type != null) { providers.put(provider, type); provider.subscribe(this); } }
public void removeProvider(ObservationProvider<?> provider) { if (providers.remove(provider) != null) { provider.unsubscribe(this); } }