Package org.apache.felix.framework
Class ServiceRegistry
java.lang.Object
org.apache.felix.framework.ServiceRegistry
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionServiceRegistry
(Logger logger, ServiceRegistry.ServiceRegistryCallbacks callbacks) -
Method Summary
Modifier and TypeMethodDescription<S> Set
<ServiceReference<S>> ServiceReference<?>[]
getRegisteredServices
(Bundle bundle) <S> S
getService
(Bundle bundle, ServiceReference<S> ref, boolean isServiceObjects) getServiceReferences
(String className, SimpleFilter filter) ServiceReference<?>[]
getServicesInUse
(Bundle bundle) Bundle[]
getUsingBundles
(ServiceReference<?> ref) registerService
(BundleContext context, String[] classNames, Object svcObj, Dictionary dict) boolean
ungetService
(Bundle bundle, ServiceReference<?> ref, Object svcObj) void
ungetServices
(Bundle bundle) This is a utility method to release all services being used by the specified bundle.void
unregisterService
(Bundle bundle, ServiceRegistration<?> reg) void
unregisterServices
(Bundle bundle) This method retrieves all services registrations for the specified bundle and invokes ServiceRegistration.unregister() on each one.
-
Constructor Details
-
ServiceRegistry
-
-
Method Details
-
getRegisteredServices
-
registerService
public ServiceRegistration<?> registerService(BundleContext context, String[] classNames, Object svcObj, Dictionary dict) -
unregisterService
-
unregisterServices
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
-
getServicesInUse
-
getService
-
ungetService
-
ungetServices
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
-
getLogger
-
getHooks
-