public class ServiceRegistry extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ServiceRegistry.ServiceRegistryCallbacks |
Constructor and Description |
---|
ServiceRegistry(ServiceRegistry.ServiceRegistryCallbacks callbacks) |
Modifier and Type | Method and Description |
---|---|
<S> Set<org.osgi.framework.ServiceReference<S>> |
getHooks(Class<S> hookClass) |
org.osgi.framework.ServiceReference[] |
getRegisteredServices(org.osgi.framework.Bundle bundle) |
<S> S |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceReference<S> ref) |
Collection<org.osgi.framework.ServiceReference<?>> |
getServiceReferences(String className,
SimpleFilter filter) |
org.osgi.framework.ServiceReference[] |
getServicesInUse(org.osgi.framework.Bundle bundle) |
org.osgi.framework.Bundle[] |
getUsingBundles(org.osgi.framework.ServiceReference ref) |
org.osgi.framework.ServiceRegistration |
registerService(org.osgi.framework.Bundle bundle,
String[] classNames,
Object svcObj,
Dictionary dict) |
boolean |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceReference ref) |
void |
ungetServices(org.osgi.framework.Bundle bundle)
This is a utility method to release all services being used by the
specified bundle.
|
void |
unregisterService(org.osgi.framework.Bundle bundle,
org.apache.felix.connect.felix.framework.ServiceRegistrationImpl reg) |
void |
unregisterServices(org.osgi.framework.Bundle bundle)
This method retrieves all services registrations for the specified bundle
and invokes ServiceRegistration.unregister() on each one.
|
public ServiceRegistry(ServiceRegistry.ServiceRegistryCallbacks callbacks)
public org.osgi.framework.ServiceReference[] getRegisteredServices(org.osgi.framework.Bundle bundle)
public org.osgi.framework.ServiceRegistration registerService(org.osgi.framework.Bundle bundle, String[] classNames, Object svcObj, Dictionary dict)
public void unregisterService(org.osgi.framework.Bundle bundle, org.apache.felix.connect.felix.framework.ServiceRegistrationImpl reg)
public void unregisterServices(org.osgi.framework.Bundle bundle)
bundle
- the bundle whose services should be unregistered.public Collection<org.osgi.framework.ServiceReference<?>> getServiceReferences(String className, SimpleFilter filter)
public org.osgi.framework.ServiceReference[] getServicesInUse(org.osgi.framework.Bundle bundle)
public <S> S getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceReference<S> ref)
public boolean ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceReference ref)
public void ungetServices(org.osgi.framework.Bundle bundle)
bundle
- the bundle whose services are to be released.public org.osgi.framework.Bundle[] getUsingBundles(org.osgi.framework.ServiceReference ref)
Copyright © 2006-2015 The Apache Software Foundation. All Rights Reserved.