public class ComponentContextImpl<S> extends java.lang.Object implements ExtComponentContext
| Modifier and Type | Class and Description |
|---|---|
private static class |
ComponentContextImpl.ComponentInstanceImpl<S> |
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.CountDownLatch |
accessibleLatch |
private java.util.Map<java.lang.String,java.util.Map<RefPair<?,?>,java.lang.Object>> |
boundValues
Mapping of ref pairs to value bound
|
private EdgeInfo[] |
edgeInfos |
private org.osgi.service.component.ComponentInstance |
m_componentInstance |
private SingleComponentManager<S> |
m_componentManager |
private boolean |
m_implementationAccessible |
private S |
m_implementationObject |
private org.osgi.framework.ServiceRegistration<S> |
m_serviceRegistration |
private org.osgi.framework.Bundle |
m_usingBundle |
private ComponentServiceObjectsHelper |
serviceObjectsHelper |
| Constructor and Description |
|---|
ComponentContextImpl(SingleComponentManager<S> componentManager,
org.osgi.framework.Bundle usingBundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
private java.util.Map<RefPair<?,?>,java.lang.Object> |
createNewFieldHandlerMap() |
void |
disableComponent(java.lang.String name) |
void |
enableComponent(java.lang.String name) |
java.util.Map<RefPair<?,?>,java.lang.Object> |
getBoundValues(java.lang.String key) |
org.osgi.framework.BundleContext |
getBundleContext() |
org.osgi.service.component.ComponentInstance |
getComponentInstance() |
protected SingleComponentManager<S> |
getComponentManager() |
ComponentServiceObjectsHelper |
getComponentServiceObjectsHelper() |
(package private) EdgeInfo |
getEdgeInfo(DependencyManager<S,?> dm) |
(package private) S |
getImplementationObject(boolean requireAccessible) |
java.util.Dictionary<java.lang.String,java.lang.Object> |
getProperties() |
org.osgi.framework.ServiceReference<S> |
getServiceReference() |
(package private) org.osgi.framework.ServiceRegistration<S> |
getServiceRegistration() |
org.osgi.framework.Bundle |
getUsingBundle() |
java.lang.Object |
locateService(java.lang.String name) |
java.lang.Object |
locateService(java.lang.String name,
org.osgi.framework.ServiceReference ref) |
java.lang.Object[] |
locateServices(java.lang.String name) |
void |
setImplementationAccessible(boolean implementationAccessible) |
void |
setImplementationObject(S implementationObject) |
void |
setServiceProperties(java.util.Dictionary<java.lang.String,?> properties)
Sets the service registration properties of the component
registered as a service.
|
void |
unsetServiceRegistration() |
private final SingleComponentManager<S> m_componentManager
private final EdgeInfo[] edgeInfos
private final org.osgi.service.component.ComponentInstance m_componentInstance
private final org.osgi.framework.Bundle m_usingBundle
private volatile org.osgi.framework.ServiceRegistration<S> m_serviceRegistration
private volatile S m_implementationObject
private volatile boolean m_implementationAccessible
private final java.util.concurrent.CountDownLatch accessibleLatch
private final ComponentServiceObjectsHelper serviceObjectsHelper
private java.util.Map<java.lang.String,java.util.Map<RefPair<?,?>,java.lang.Object>> boundValues
public ComponentContextImpl(SingleComponentManager<S> componentManager, org.osgi.framework.Bundle usingBundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration)
public void unsetServiceRegistration()
public void cleanup()
public ComponentServiceObjectsHelper getComponentServiceObjectsHelper()
public void setImplementationObject(S implementationObject)
public void setImplementationAccessible(boolean implementationAccessible)
EdgeInfo getEdgeInfo(DependencyManager<S,?> dm)
org.osgi.framework.ServiceRegistration<S> getServiceRegistration()
protected SingleComponentManager<S> getComponentManager()
public final java.util.Dictionary<java.lang.String,java.lang.Object> getProperties()
getProperties in interface org.osgi.service.component.ComponentContextpublic java.lang.Object locateService(java.lang.String name)
locateService in interface org.osgi.service.component.ComponentContextpublic java.lang.Object locateService(java.lang.String name,
org.osgi.framework.ServiceReference ref)
locateService in interface org.osgi.service.component.ComponentContextpublic java.lang.Object[] locateServices(java.lang.String name)
locateServices in interface org.osgi.service.component.ComponentContextpublic org.osgi.framework.BundleContext getBundleContext()
getBundleContext in interface org.osgi.service.component.ComponentContextpublic org.osgi.framework.Bundle getUsingBundle()
getUsingBundle in interface org.osgi.service.component.ComponentContextpublic org.osgi.service.component.ComponentInstance getComponentInstance()
getComponentInstance in interface org.osgi.service.component.ComponentContextpublic void enableComponent(java.lang.String name)
enableComponent in interface org.osgi.service.component.ComponentContextpublic void disableComponent(java.lang.String name)
disableComponent in interface org.osgi.service.component.ComponentContextpublic org.osgi.framework.ServiceReference<S> getServiceReference()
getServiceReference in interface org.osgi.service.component.ComponentContextpublic void setServiceProperties(java.util.Dictionary<java.lang.String,?> properties)
ExtComponentContext
The component.id and component.name
property are set by the Service Component Runtime and cannot be
removed or replaced.
setServiceProperties in interface ExtComponentContextproperties - properties to update the default component
properties with. If this is null or empty the
default set of properties as defined in Section 112.6,
Component Properties, are used as the service registration
properties.S getImplementationObject(boolean requireAccessible)
public java.util.Map<RefPair<?,?>,java.lang.Object> getBoundValues(java.lang.String key)
private java.util.Map<RefPair<?,?>,java.lang.Object> createNewFieldHandlerMap()