Class ServiceFactoryComponentManager<S>
java.lang.Object
org.apache.felix.scr.impl.manager.AbstractComponentManager<S>
org.apache.felix.scr.impl.manager.SingleComponentManager<S>
org.apache.felix.scr.impl.manager.ServiceFactoryComponentManager<S>
- All Implemented Interfaces:
ComponentManager<S>, org.osgi.framework.ServiceFactory<S>
- Direct Known Subclasses:
PrototypeServiceFactoryComponentManager
The
ServiceFactoryComponentManager for components specified with <service serviceFactory='true'/>
in the xml metadata. The component must be delayed, not immediate or factory.-
Nested Class Summary
Nested classes/interfaces inherited from class SingleComponentManager
SingleComponentManager.SetImplementationObject<S>Nested classes/interfaces inherited from class AbstractComponentManager
AbstractComponentManager.State -
Field Summary
FieldsFields inherited from class AbstractComponentManager
m_activationLock, m_container, m_factoryInstance, REASONS, registrationManagerFields inherited from interface ComponentManager
STATE_ACTIVE, STATE_DISPOSED, STATE_SATISFIED, STATE_UNSATISFIED_CONFIGURATION, STATE_UNSATISFIED_REFERENCE -
Constructor Summary
ConstructorsConstructorDescriptionServiceFactoryComponentManager(ComponentContainer<S> container, ComponentMethods<S> componentMethods) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteComponent(int reason) private Collection<ComponentContextImpl<S>> org.osgi.service.component.ComponentInstancegetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration) (package private) <T> voidinvokeBindMethod(DependencyManager<S, T> dependencyManager, RefPair<S, T> refPair, int trackingCount) protected MethodResult(package private) <T> voidinvokeUnbindMethod(DependencyManager<S, T> dependencyManager, RefPair<S, T> oldRefPair, int trackingCount) (package private) <T> booleaninvokeUpdatedMethod(DependencyManager<S, T> dependencyManager, RefPair<S, T> refPair, int trackingCount) Invoke updated method(package private) voidvoidsetServiceProperties(Dictionary<String, ?> serviceProperties) voidungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<S> registration, S service) Methods inherited from class SingleComponentManager
clear, clearServiceProperties, createImplementationObject, disposeImplementationObject, getComponentManagers, getProperties, getServiceInternal, getServiceProperties, getServiceReference, getServiceRegistration, preDeregister, reconfigure, reconfigure, registerComponentId, setFactoryProperties, unregisterComponentIdMethods inherited from class AbstractComponentManager
activateInternal, collectDependencies, copyTo, copyToDictionary, copyToMap, deactivateInternal, disable, disableInternal, dispose, dispose, dumpThreads, enable, enableInternal, enableLatchWait, getActivator, getBundle, getBundleContext, getComponentMetadata, getComponentMethods, getDependencyManager, getDependencyManagers, getFailureReason, getId, getLockTimeout, getLogger, getProvidedServices, getReferenceManagers, getRegisteredServiceReference, getReversedDependencyManagers, getSpecState, getState, getTrackingCount, isFactory, isImmediate, isStateLocked, notifyWaiters, obtainActivationReadLock, obtainActivationWriteLock, obtainStateLock, registerMissingDependency, registerService, releaseActivationReadLock, releaseActivationWriteeLock, releaseStateLock, setFailureReason, setServiceProperties, setState, toString, tracked, unregisterService, updateTargets, verifyDependencyManagers, waitForTracked
-
Field Details
-
serviceContexts
-
-
Constructor Details
-
ServiceFactoryComponentManager
public ServiceFactoryComponentManager(ComponentContainer<S> container, ComponentMethods<S> componentMethods) - Parameters:
container- ComponentHolder for configuration managementcomponentMethods-
-
-
Method Details
-
setServiceProperties
- Overrides:
setServicePropertiesin classSingleComponentManager<S>
-
postRegister
void postRegister()- Overrides:
postRegisterin classSingleComponentManager<S>
-
deleteComponent
protected void deleteComponent(int reason) - Overrides:
deleteComponentin classSingleComponentManager<S>
-
getService
public S getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration) - Specified by:
getServicein interfaceorg.osgi.framework.ServiceFactory<S>- Overrides:
getServicein classSingleComponentManager<S>
-
ungetService
public void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<S> registration, S service) - Specified by:
ungetServicein interfaceorg.osgi.framework.ServiceFactory<S>- Overrides:
ungetServicein classSingleComponentManager<S>
-
getComponentContexts
-
invokeBindMethod
<T> void invokeBindMethod(DependencyManager<S, T> dependencyManager, RefPair<S, T> refPair, int trackingCount) - Overrides:
invokeBindMethodin classSingleComponentManager<S>
-
invokeUpdatedMethod
<T> boolean invokeUpdatedMethod(DependencyManager<S, T> dependencyManager, RefPair<S, T> refPair, int trackingCount) Description copied from class:AbstractComponentManagerInvoke updated method- Overrides:
invokeUpdatedMethodin classSingleComponentManager<S>- Returns:
trueif the component needs reactivation,falseotherwise.
-
invokeUnbindMethod
<T> void invokeUnbindMethod(DependencyManager<S, T> dependencyManager, RefPair<S, T> oldRefPair, int trackingCount) - Overrides:
invokeUnbindMethodin classSingleComponentManager<S>
-
invokeModifiedMethod
- Overrides:
invokeModifiedMethodin classSingleComponentManager<S>
-
getComponentInstance
public org.osgi.service.component.ComponentInstance getComponentInstance()- Overrides:
getComponentInstancein classSingleComponentManager<S>
-