Class ServiceRegistry

java.lang.Object
org.apache.felix.framework.ServiceRegistry

public class ServiceRegistry extends Object
  • Constructor Details

  • Method Details

    • getRegisteredServices

      public ServiceReference<?>[] getRegisteredServices(Bundle bundle)
    • registerService

      public ServiceRegistration<?> registerService(BundleContext context, String[] classNames, Object svcObj, Dictionary dict)
    • unregisterService

      public void unregisterService(Bundle bundle, ServiceRegistration<?> reg)
    • unregisterServices

      public void unregisterServices(Bundle bundle)
      This method retrieves all services registrations for the specified bundle and invokes ServiceRegistration.unregister() on each one. This method is only called be the framework to clean up after a stopped bundle.
      Parameters:
      bundle - the bundle whose services should be unregistered.
    • getServiceReferences

      public Collection getServiceReferences(String className, SimpleFilter filter)
    • getServicesInUse

      public ServiceReference<?>[] getServicesInUse(Bundle bundle)
    • getService

      public <S> S getService(Bundle bundle, ServiceReference<S> ref, boolean isServiceObjects)
    • ungetService

      public boolean ungetService(Bundle bundle, ServiceReference<?> ref, Object svcObj)
    • ungetServices

      public void ungetServices(Bundle bundle)
      This is a utility method to release all services being used by the specified bundle.
      Parameters:
      bundle - the bundle whose services are to be released.
    • getUsingBundles

      public Bundle[] getUsingBundles(ServiceReference<?> ref)
    • getLogger

      public Logger getLogger()
    • getHooks

      public <S> Set<ServiceReference<S>> getHooks(Class<S> hookClass)