de.kalpatec.pojosr.framework.felix.framework
Class ServiceRegistry
java.lang.Object
de.kalpatec.pojosr.framework.felix.framework.ServiceRegistry
public class ServiceRegistry
- extends Object
|
Method Summary |
<S> Set<org.osgi.framework.ServiceReference<S>> |
|
getHooks(Class<S> hookClass)
|
org.osgi.framework.ServiceReference[] |
getRegisteredServices(org.osgi.framework.Bundle bundle)
|
|
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceReference<S> ref)
|
List |
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.osgi.framework.ServiceRegistration 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceRegistry
public ServiceRegistry(ServiceRegistry.ServiceRegistryCallbacks callbacks)
getRegisteredServices
public org.osgi.framework.ServiceReference[] getRegisteredServices(org.osgi.framework.Bundle bundle)
registerService
public org.osgi.framework.ServiceRegistration registerService(org.osgi.framework.Bundle bundle,
String[] classNames,
Object svcObj,
Dictionary dict)
unregisterService
public void unregisterService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration reg)
unregisterServices
public void unregisterServices(org.osgi.framework.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 List getServiceReferences(String className,
SimpleFilter filter)
getServicesInUse
public org.osgi.framework.ServiceReference[] getServicesInUse(org.osgi.framework.Bundle bundle)
getService
public <S> S getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceReference<S> ref)
ungetService
public boolean ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceReference ref)
ungetServices
public void ungetServices(org.osgi.framework.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 org.osgi.framework.Bundle[] getUsingBundles(org.osgi.framework.ServiceReference ref)
getHooks
public <S> Set<org.osgi.framework.ServiceReference<S>> getHooks(Class<S> hookClass)
Copyright © 2012. All Rights Reserved.