public class SingleComponentManager<S> extends AbstractComponentManager<S> implements org.osgi.framework.ServiceFactory<S>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
SingleComponentManager.SetImplementationObject<S>
The
SetImplementationObject interface provides an
API for component managers to setup the implementation object and
potentially other parts as part of the createImplementationObject(org.osgi.framework.Bundle, org.apache.felix.scr.impl.manager.SingleComponentManager.SetImplementationObject<S>, org.apache.felix.scr.impl.manager.ComponentContextImpl<S>) method
processing. |
AbstractComponentManager.Statem_activationLock, m_container, m_factoryInstanceSTATE_ACTIVE, STATE_DISPOSED, STATE_SATISFIED, STATE_UNSATISFIED_CONFIGURATION, STATE_UNSATISFIED_REFERENCE| Constructor and Description |
|---|
SingleComponentManager(ComponentContainer<S> container,
ComponentMethods<S> componentMethods)
The constructor receives both the activator and the metadata
|
SingleComponentManager(ComponentContainer<S> container,
ComponentMethods<S> componentMethods,
boolean factoryInstance) |
| Modifier and Type | Method and Description |
|---|---|
protected S |
createImplementationObject(org.osgi.framework.Bundle usingBundle,
SingleComponentManager.SetImplementationObject<S> setter,
ComponentContextImpl<S> componentContext) |
protected void |
deleteComponent(int reason) |
protected void |
disposeImplementationObject(ComponentContextImpl<S> componentContext,
int reason) |
org.osgi.service.component.ComponentInstance<S> |
getComponentInstance() |
void |
getComponentManagers(List<AbstractComponentManager<S>> cms) |
Map<String,Object> |
getProperties()
Returns the (private copy) of the Component properties to be used
for the ComponentContext as well as eventual service registration.
|
S |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration) |
Dictionary<String,Object> |
getServiceProperties()
Returns the subset of component properties to be used as service
properties.
|
protected org.osgi.framework.ServiceRegistration<S> |
getServiceRegistration() |
protected MethodResult |
invokeModifiedMethod() |
void |
reconfigure(Map<String,Object> configuration,
boolean configurationDeleted,
TargetedPID factoryPid)
Called by the Configuration Admin Service to update the component with
Configuration properties.
|
protected void |
setFactoryProperties(Dictionary<String,?> dictionary) |
void |
setServiceProperties(Dictionary<String,?> serviceProperties) |
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration,
S o) |
collectDependencies, copyTo, copyToDictionary, copyToMap, disable, dispose, enable, getActivator, getBundle, getComponentMetadata, getFailureReason, getId, getLogger, getProvidedServices, getReferenceManagers, getRegisteredServiceReference, getSpecState, isFactory, isImmediate, registerService, setFailureReason, setServiceProperties, toString, unregisterService, verifyDependencyManagerspublic SingleComponentManager(ComponentContainer<S> container, ComponentMethods<S> componentMethods)
componentMethods - public SingleComponentManager(ComponentContainer<S> container, ComponentMethods<S> componentMethods, boolean factoryInstance)
protected void deleteComponent(int reason)
deleteComponent in class AbstractComponentManager<S>public org.osgi.service.component.ComponentInstance<S> getComponentInstance()
protected S createImplementationObject(org.osgi.framework.Bundle usingBundle, SingleComponentManager.SetImplementationObject<S> setter, ComponentContextImpl<S> componentContext)
protected void disposeImplementationObject(ComponentContextImpl<S> componentContext, int reason)
protected void setFactoryProperties(Dictionary<String,?> dictionary)
public Map<String,Object> getProperties()
getProperties in interface ComponentManager<S>getProperties in class AbstractComponentManager<S>public void setServiceProperties(Dictionary<String,?> serviceProperties)
setServiceProperties in class AbstractComponentManager<S>public Dictionary<String,Object> getServiceProperties()
AbstractComponentManagergetServiceProperties in class AbstractComponentManager<S>protected org.osgi.framework.ServiceRegistration<S> getServiceRegistration()
getServiceRegistration in class AbstractComponentManager<S>public void reconfigure(Map<String,Object> configuration, boolean configurationDeleted, TargetedPID factoryPid)
configuration parameter is null. In this case
nothing is to be done. If a configuration has previously been set and
now the configuration is deleted, the configuration
parameter is null and the component has to be reactivated
with the default configuration.reconfigure in class AbstractComponentManager<S>configuration - The configuration properties for the component from
the Configuration Admin Service or null if there is
no configuration or if the configuration has just been deleted.configurationDeleted - TODOfactoryPid - TODOprotected MethodResult invokeModifiedMethod()
public S getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration)
getService in interface org.osgi.framework.ServiceFactory<S>public void ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration,
S o)
ungetService in interface org.osgi.framework.ServiceFactory<S>public void getComponentManagers(List<AbstractComponentManager<S>> cms)
getComponentManagers in class AbstractComponentManager<S>Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.