Class ComponentContextImpl<S>
java.lang.Object
org.apache.felix.scr.impl.manager.ComponentContextImpl<S>
- All Implemented Interfaces:
ExtComponentContext, ScrComponentContext, org.osgi.service.component.ComponentContext
Implementation for the ComponentContext interface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CountDownLatchMapping of ref pairs to value boundprivate final EdgeInfo[]private final org.osgi.service.component.ComponentInstance<S> private final SingleComponentManager<S> private booleanprivate Sprivate org.osgi.framework.ServiceRegistration<S> private final org.osgi.framework.Bundleprivate final ComponentServiceObjectsHelper -
Constructor Summary
ConstructorsConstructorDescriptionComponentContextImpl(SingleComponentManager<S> componentManager, org.osgi.framework.Bundle usingBundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()voiddisableComponent(String name) voidenableComponent(String name) getBoundValues(String key) org.osgi.framework.BundleContextorg.osgi.service.component.ComponentInstance<S> protected SingleComponentManager<S> (package private) EdgeInfogetEdgeInfo(DependencyManager<S, ?> dm) (package private) SgetImplementationObject(boolean requireAccessible) final Dictionary<String, Object> org.osgi.framework.ServiceReference<S> (package private) org.osgi.framework.ServiceRegistration<S> org.osgi.framework.BundlelocateService(String name) locateService(String name, org.osgi.framework.ServiceReference ref) Object[]locateServices(String name) voidsetImplementationAccessible(boolean implementationAccessible) voidsetImplementationObject(S implementationObject) voidsetServiceProperties(Dictionary<String, ?> properties) Sets the service registration properties of the component registered as a service.void
-
Field Details
-
m_componentManager
-
edgeInfos
-
m_componentInstance
-
m_usingBundle
private final org.osgi.framework.Bundle m_usingBundle -
m_serviceRegistration
-
m_implementationObject
-
m_implementationAccessible
private volatile boolean m_implementationAccessible -
accessibleLatch
-
serviceObjectsHelper
-
boundValues
-
-
Constructor Details
-
ComponentContextImpl
public ComponentContextImpl(SingleComponentManager<S> componentManager, org.osgi.framework.Bundle usingBundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration)
-
-
Method Details
-
unsetServiceRegistration
public void unsetServiceRegistration() -
cleanup
public void cleanup() -
getComponentServiceObjectsHelper
- Specified by:
getComponentServiceObjectsHelperin interfaceScrComponentContext
-
setImplementationObject
-
setImplementationAccessible
public void setImplementationAccessible(boolean implementationAccessible) -
getEdgeInfo
-
getServiceRegistration
org.osgi.framework.ServiceRegistration<S> getServiceRegistration() -
getComponentManager
-
getComponentMetadata
- Specified by:
getComponentMetadatain interfaceScrComponentContext
-
getProperties
- Specified by:
getPropertiesin interfaceorg.osgi.service.component.ComponentContext
-
locateService
-
locateService
-
locateServices
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()- Specified by:
getBundleContextin interfaceorg.osgi.service.component.ComponentContext
-
getUsingBundle
public org.osgi.framework.Bundle getUsingBundle()- Specified by:
getUsingBundlein interfaceorg.osgi.service.component.ComponentContext
-
getLogger
- Specified by:
getLoggerin interfaceScrComponentContext
-
getComponentInstance
- Specified by:
getComponentInstancein interfaceorg.osgi.service.component.ComponentContext
-
enableComponent
- Specified by:
enableComponentin interfaceorg.osgi.service.component.ComponentContext
-
disableComponent
- Specified by:
disableComponentin interfaceorg.osgi.service.component.ComponentContext
-
getServiceReference
- Specified by:
getServiceReferencein interfaceorg.osgi.service.component.ComponentContext
-
setServiceProperties
Description copied from interface:ExtComponentContextSets the service registration properties of the component registered as a service. If the component is not registered as a service, this method has no effect.The
component.idandcomponent.nameproperty are set by the Service Component Runtime and cannot be removed or replaced.- Specified by:
setServicePropertiesin interfaceExtComponentContext- Parameters:
properties- properties to update the default component properties with. If this isnullor empty the default set of properties as defined in Section 112.6, Component Properties, are used as the service registration properties.
-
getImplementationObject
-
getBoundValues
- Specified by:
getBoundValuesin interfaceScrComponentContext
-
createNewFieldHandlerMap
-