Class OsgiJolokiaServiceFactory

java.lang.Object
org.jolokia.server.core.service.impl.OsgiJolokiaServiceFactory
All Implemented Interfaces:
JolokiaServiceLookup

public class OsgiJolokiaServiceFactory extends Object implements JolokiaServiceLookup
Service Factory for tracking OSGi Jolokia Services
Since:
19.06.13
Author:
roland
  • Constructor Details

    • OsgiJolokiaServiceFactory

      public OsgiJolokiaServiceFactory(org.osgi.framework.BundleContext pCtx)
      A new factory associated with the given context
      Parameters:
      pCtx - the OSGi context
  • Method Details

    • getServices

      public <T extends JolokiaService<?>> Set<T> getServices(Class<T> pType)
      Get the current list of available services for a certain type.
      Specified by:
      getServices in interface JolokiaServiceLookup
      Parameters:
      pType - type for which to get the services
      Returns:
      set of services for the required type or an empty set
    • init

      public void init(JolokiaContext pJolokiaContext)
      Lifecycle method called when the service managed starts up
      Specified by:
      init in interface JolokiaServiceLookup
      Parameters:
      pJolokiaContext - created context
    • destroy

      public void destroy()
      Close down the factory by closing all existing service trackers
      Specified by:
      destroy in interface JolokiaServiceLookup