public class ServiceFactoryComponentManager<S> extends SingleComponentManager<S>
ServiceFactoryComponentManager for components specified with <service serviceFactory='true'/>
in the xml metadata. The component must be delayed, not immediate or factory.SingleComponentManager.SetImplementationObject<S>AbstractComponentManager.State| Modifier and Type | Field and Description |
|---|---|
private java.util.IdentityHashMap<S,ComponentContextImpl<S>> |
serviceContexts |
m_activationLock, m_container, m_factoryInstance, REASONSSTATE_ACTIVE, STATE_DISABLED, STATE_DISPOSED, STATE_SATISFIED, STATE_UNSATISFIED_CONFIGURATION, STATE_UNSATISFIED_REFERENCE| Constructor and Description |
|---|
ServiceFactoryComponentManager(ComponentContainer<S> container,
ComponentMethods componentMethods) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deleteComponent(int reason) |
private java.util.Collection<ComponentContextImpl<S>> |
getComponentContexts() |
org.osgi.service.component.ComponentInstance |
getComponentInstance() |
S |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<S> serviceRegistration) |
(package private) boolean |
hasInstance() |
(package private) <T> void |
invokeBindMethod(DependencyManager<S,T> dependencyManager,
RefPair<S,T> refPair,
int trackingCount) |
protected MethodResult |
invokeModifiedMethod() |
(package private) <T> void |
invokeUnbindMethod(DependencyManager<S,T> dependencyManager,
RefPair<S,T> oldRefPair,
int trackingCount) |
(package private) <T> boolean |
invokeUpdatedMethod(DependencyManager<S,T> dependencyManager,
RefPair<S,T> refPair,
int trackingCount)
Invoke updated method
|
(package private) void |
postRegister() |
void |
setServiceProperties(java.util.Dictionary<java.lang.String,?> serviceProperties) |
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<S> registration,
S service) |
clear, clearServiceProperties, createImplementationObject, disposeImplementationObject, getComponentManagers, getProperties, getServiceInternal, getServiceProperties, getServiceReference, getServiceRegistration, preDeregister, reconfigure, reconfigure, registerComponentId, setFactoryProperties, unregisterComponentIdactivateInternal, collectDependencies, copyTo, copyToDictionary, copyToMap, deactivateInternal, disable, disableInternal, dispose, dispose, dumpThreads, enable, enableInternal, enableLatchWait, getActivator, getBundle, getBundleContext, getComponentMetadata, getComponentMethods, getDependencyManager, getDependencyManagers, getId, getLockTimeout, getName, getProvidedServices, getReferenceManagers, getReversedDependencyManagers, getSpecState, getState, getTrackingCount, isActivatorActive, isFactory, isImmediate, isLogEnabled, isStateLocked, log, log, obtainActivationReadLock, obtainActivationWriteLock, obtainStateLock, registerMissingDependency, registerService, releaseActivationReadLock, releaseActivationWriteeLock, releaseStateLock, setServiceProperties, setState, toString, tracked, unregisterService, updateTargets, verifyDependencyManagers, waitForTrackedprivate java.util.IdentityHashMap<S,ComponentContextImpl<S>> serviceContexts
public ServiceFactoryComponentManager(ComponentContainer<S> container, ComponentMethods componentMethods)
container - ComponentHolder for configuration managementcomponentMethods - public void setServiceProperties(java.util.Dictionary<java.lang.String,?> serviceProperties)
setServiceProperties in class SingleComponentManager<S>void postRegister()
postRegister in class SingleComponentManager<S>protected void deleteComponent(int reason)
deleteComponent in class SingleComponentManager<S>public S getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<S> serviceRegistration)
getService in interface org.osgi.framework.ServiceFactory<S>getService in class SingleComponentManager<S>public void ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<S> registration,
S service)
ungetService in interface org.osgi.framework.ServiceFactory<S>ungetService in class SingleComponentManager<S>private java.util.Collection<ComponentContextImpl<S>> getComponentContexts()
<T> void invokeBindMethod(DependencyManager<S,T> dependencyManager, RefPair<S,T> refPair, int trackingCount)
invokeBindMethod in class SingleComponentManager<S><T> boolean invokeUpdatedMethod(DependencyManager<S,T> dependencyManager, RefPair<S,T> refPair, int trackingCount)
AbstractComponentManagerinvokeUpdatedMethod in class SingleComponentManager<S>true if the component needs reactivation, false otherwise.<T> void invokeUnbindMethod(DependencyManager<S,T> dependencyManager, RefPair<S,T> oldRefPair, int trackingCount)
invokeUnbindMethod in class SingleComponentManager<S>protected MethodResult invokeModifiedMethod()
invokeModifiedMethod in class SingleComponentManager<S>boolean hasInstance()
hasInstance in class SingleComponentManager<S>public org.osgi.service.component.ComponentInstance getComponentInstance()
getComponentInstance in class SingleComponentManager<S>