ExtComponentContext, org.osgi.service.component.ComponentContextpublic class ComponentContextImpl<S> extends Object implements ExtComponentContext
| Constructor | Description |
|---|---|
ComponentContextImpl(SingleComponentManager<S> componentManager,
org.osgi.framework.Bundle usingBundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cleanup() |
|
void |
disableComponent(String name) |
|
void |
enableComponent(String name) |
|
Map<RefPair<?,?>,Object> |
getBoundValues(String key) |
|
org.osgi.framework.BundleContext |
getBundleContext() |
|
org.osgi.service.component.ComponentInstance |
getComponentInstance() |
|
protected SingleComponentManager<S> |
getComponentManager() |
|
ComponentServiceObjectsHelper |
getComponentServiceObjectsHelper() |
|
Dictionary<String,Object> |
getProperties() |
|
org.osgi.framework.ServiceReference<S> |
getServiceReference() |
|
org.osgi.framework.Bundle |
getUsingBundle() |
|
Object |
locateService(String name) |
|
Object |
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 |
unsetServiceRegistration() |
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)
protected SingleComponentManager<S> getComponentManager()
public final Dictionary<String,Object> getProperties()
getProperties in interface org.osgi.service.component.ComponentContextpublic Object locateService(String name)
locateService in interface org.osgi.service.component.ComponentContextpublic Object locateService(String name, org.osgi.framework.ServiceReference ref)
locateService in interface org.osgi.service.component.ComponentContextpublic Object[] locateServices(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(String name)
enableComponent in interface org.osgi.service.component.ComponentContextpublic void disableComponent(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(Dictionary<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.Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.