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.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 ComponentLogger getLogger()
public org.osgi.service.component.ComponentInstance<S> 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–2020 The Apache Software Foundation. All rights reserved.