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 CountDownLatch
Mapping of ref pairs to value boundprivate final EdgeInfo[]
private final org.osgi.service.component.ComponentInstance
<S> private final SingleComponentManager
<S> private boolean
private S
private org.osgi.framework.ServiceRegistration
<S> private final org.osgi.framework.Bundle
private final ComponentServiceObjectsHelper
-
Constructor Summary
ConstructorsConstructorDescriptionComponentContextImpl
(SingleComponentManager<S> componentManager, org.osgi.framework.Bundle usingBundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
void
disableComponent
(String name) void
enableComponent
(String name) getBoundValues
(String key) org.osgi.framework.BundleContext
org.osgi.service.component.ComponentInstance
<S> protected SingleComponentManager
<S> (package private) EdgeInfo
getEdgeInfo
(DependencyManager<S, ?> dm) (package private) S
getImplementationObject
(boolean requireAccessible) final Dictionary
<String, Object> org.osgi.framework.ServiceReference
<S> (package private) org.osgi.framework.ServiceRegistration
<S> org.osgi.framework.Bundle
locateService
(String name) locateService
(String name, org.osgi.framework.ServiceReference ref) Object[]
locateServices
(String name) void
setImplementationAccessible
(boolean implementationAccessible) void
setImplementationObject
(S implementationObject) void
setServiceProperties
(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
Mapping of ref pairs to value bound
-
-
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:
getComponentServiceObjectsHelper
in interfaceScrComponentContext
-
setImplementationObject
-
setImplementationAccessible
public void setImplementationAccessible(boolean implementationAccessible) -
getEdgeInfo
-
getServiceRegistration
org.osgi.framework.ServiceRegistration<S> getServiceRegistration() -
getComponentManager
-
getComponentMetadata
- Specified by:
getComponentMetadata
in interfaceScrComponentContext
-
getProperties
- Specified by:
getProperties
in interfaceorg.osgi.service.component.ComponentContext
-
locateService
- Specified by:
locateService
in interfaceorg.osgi.service.component.ComponentContext
-
locateService
- Specified by:
locateService
in interfaceorg.osgi.service.component.ComponentContext
-
locateServices
- Specified by:
locateServices
in interfaceorg.osgi.service.component.ComponentContext
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()- Specified by:
getBundleContext
in interfaceorg.osgi.service.component.ComponentContext
-
getUsingBundle
public org.osgi.framework.Bundle getUsingBundle()- Specified by:
getUsingBundle
in interfaceorg.osgi.service.component.ComponentContext
-
getLogger
- Specified by:
getLogger
in interfaceScrComponentContext
-
getComponentInstance
- Specified by:
getComponentInstance
in interfaceorg.osgi.service.component.ComponentContext
-
enableComponent
- Specified by:
enableComponent
in interfaceorg.osgi.service.component.ComponentContext
-
disableComponent
- Specified by:
disableComponent
in interfaceorg.osgi.service.component.ComponentContext
-
getServiceReference
- Specified by:
getServiceReference
in interfaceorg.osgi.service.component.ComponentContext
-
setServiceProperties
Description copied from interface:ExtComponentContext
Sets 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.id
andcomponent.name
property are set by the Service Component Runtime and cannot be removed or replaced.- Specified by:
setServiceProperties
in interfaceExtComponentContext
- Parameters:
properties
- properties to update the default component properties with. If this isnull
or 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:
getBoundValues
in interfaceScrComponentContext
-
createNewFieldHandlerMap
-