public class ComponentContextImpl<S> extends Object implements ExtComponentContext
Constructor and Description |
---|
ComponentContextImpl(SingleComponentManager<S> componentManager,
org.osgi.framework.Bundle usingBundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration) |
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 ComponentMetadata getComponentMetadata()
public final Dictionary<String,Object> getProperties()
getProperties
in interface org.osgi.service.component.ComponentContext
public Object locateService(String name)
locateService
in interface org.osgi.service.component.ComponentContext
public Object locateService(String name, org.osgi.framework.ServiceReference ref)
locateService
in interface org.osgi.service.component.ComponentContext
public Object[] locateServices(String name)
locateServices
in interface org.osgi.service.component.ComponentContext
public org.osgi.framework.BundleContext getBundleContext()
getBundleContext
in interface org.osgi.service.component.ComponentContext
public org.osgi.framework.Bundle getUsingBundle()
getUsingBundle
in interface org.osgi.service.component.ComponentContext
public ComponentLogger getLogger()
public org.osgi.service.component.ComponentInstance<S> getComponentInstance()
getComponentInstance
in interface org.osgi.service.component.ComponentContext
public void enableComponent(String name)
enableComponent
in interface org.osgi.service.component.ComponentContext
public void disableComponent(String name)
disableComponent
in interface org.osgi.service.component.ComponentContext
public org.osgi.framework.ServiceReference<S> getServiceReference()
getServiceReference
in interface org.osgi.service.component.ComponentContext
public 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 ExtComponentContext
properties
- 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–2020 The Apache Software Foundation. All rights reserved.