public static class OsgiBundleScope.BundleScopeServiceFactory
extends java.lang.Object
implements org.osgi.framework.ServiceFactory
ServiceFactory used for supporting
'bundle' scoped localBeans.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<org.osgi.framework.Bundle,java.lang.Runnable> |
callbacks
destruction callbacks for bean instances
|
private org.osgi.framework.ServiceFactory |
decoratedServiceFactory |
| Constructor and Description |
|---|
BundleScopeServiceFactory(org.osgi.framework.ServiceFactory serviceFactory) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration)
Called if a bundle requests a service for the first time (start the
scope).
|
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
java.lang.Object service)
Called if a bundle releases the service (stop the scope).
|
private org.osgi.framework.ServiceFactory decoratedServiceFactory
private final java.util.Map<org.osgi.framework.Bundle,java.lang.Runnable> callbacks
public BundleScopeServiceFactory(org.osgi.framework.ServiceFactory serviceFactory)
public java.lang.Object getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration)
getService in interface org.osgi.framework.ServiceFactoryServiceFactory.getService(org.osgi.framework.Bundle,
org.osgi.framework.ServiceRegistration)public void ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
java.lang.Object service)
ungetService in interface org.osgi.framework.ServiceFactoryServiceFactory.ungetService(org.osgi.framework.Bundle,
org.osgi.framework.ServiceRegistration, java.lang.Object)