mreutegg commented on code in PR #6:
URL: 
https://github.com/apache/sling-org-apache-sling-discovery-impl/pull/6#discussion_r1753247709


##########
src/main/java/org/apache/sling/discovery/impl/Config.java:
##########
@@ -22,26 +22,34 @@
 import java.net.URL;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.discovery.base.connectors.BaseConfig;
 import 
org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.metatype.annotations.Designate;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_BACKOFF_STABLE_FACTOR;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_BACKOFF_STANDBY_FACTOR;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_CONNECTION_TIMEOUT;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_DISCOVERY_RESOURCE_PATH;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_HEARTBEAT_INTERVAL;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_HEARTBEAT_TIMEOUT;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_MIN_EVENT_DELAY;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_SO_TIMEOUT;
+import static 
org.apache.sling.discovery.impl.DiscoveryServiceConfig.DEFAULT_TOPOLOGY_CONNECTOR_WHITELIST;
+
 /**
  * Configuration object used as a central config point for the discovery 
service
  * implementation
  * <p>
  * The properties are described below under.
  */
-@Component(metatype = true, label="%config.name", 
description="%config.description")
-@Service(value = { Config.class, BaseConfig.class, DiscoveryLiteConfig.class })
+@Component(service = { Config.class, BaseConfig.class, 
DiscoveryLiteConfig.class })
+@Designate(ocd = DiscoveryServiceConfig.class)
 public class Config implements BaseConfig, DiscoveryLiteConfig {

Review Comment:
   I don't know this OSGi feature and I tried to keep changes to a minimum. But 
it probably make sense to clean up the implementation further when there are 
more simple alternatives for configuration.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to