Differences

This shows you the differences between two versions of the page.

Link to this comparison view

query_all_osgi_services [2015/05/07 16:47]
query_all_osgi_services [2021/04/05 11:23] (current)
Line 1: Line 1:
 +====== Query all OSGi Services ======
 +Once in a while you may need to query all currently registered services in the OSGi container. This can be achieved by using the BundleContext class.
  
 +  ServiceReference<?>[] references = bundleContext.getAllServiceReferences(null, null);
 +
 +{{tag>java osgi}}