kwin commented on code in PR #2714:
URL: https://github.com/apache/tika/pull/2714#discussion_r2989797746
##########
tika-core/src/main/java/org/apache/tika/config/ServiceLoader.java:
##########
@@ -34,14 +34,25 @@
import java.util.Set;
import java.util.regex.Pattern;
+import aQute.bnd.annotation.spi.ServiceConsumer;
+
+import org.apache.tika.detect.Detector;
import org.apache.tika.exception.TikaConfigException;
+import org.apache.tika.parser.Parser;
import org.apache.tika.utils.ServiceLoaderUtils;
/**
* Internal utility class that Tika uses to look up service providers.
+ * Supports both static service loading using the {@link ServiceLoader}
mechanism (and via
+ * <a
href="https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.loader.html">OSGi
Service Loader Mediator</a>)
+ * as well as dynamic loading via OSGi service tracking (from the {@link
TikaActivator} class).
+ * However the Tika parsers don't register as regular OSGi services,
+ * so the dynamic loading is only used for detectors and parser services from
non-Tika bundles.
*
* @since Apache Tika 0.9
*/
+@ServiceConsumer(Parser.class)
+@ServiceConsumer(Detector.class)
Review Comment:
What about the other service interfaces being mentioned at
https://github.com/apache/tika/blob/84166bafb9bffb8ff166ee5f3394de6456555e3d/tika-annotation-processor/src/main/java/org/apache/tika/annotation/TikaComponentProcessor.java#L76-L82?
Are those looked up via this class as well?
--
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]