Define multiple implementations of a Service, and then execute all/specific implementation depending on the use-case.
OSGi Configuration factory for multiple service configurations with single implementation.
Here is a code snippet that can be used to fetch AEM's product information via APIs. Information printed in logs:
Here are few code snippets compiled in a java program, which would help you fetch bundle and service information from BundleContext. The snippets cover: Fetching bundle information Fetching ServiceReference from bundle Fetching Service from bundleContext More API details can be retrived from: https://osgi.org/javadoc/r4v43/core/org/osgi/framework/Bundle.html https://osgi.org/javadoc/r4v43/core/org/osgi/framework/ServiceReference.html