public class CompositeFactory extends ComponentFactory implements TrackerCustomizer
IPojoFactory.DefaultNameGenerator, IPojoFactory.NameGenerator, IPojoFactory.RequiredHandler, IPojoFactory.RetryNameGenerator| Modifier and Type | Field and Description |
|---|---|
protected Tracker |
m_tracker
Tracker used to track required handler factories.
|
HANDLER_AUTO_PRIMITIVEINSTANCE_NAME, m_componentDesc, m_componentInstances, m_componentMetadata, m_context, m_factoryName, m_isPublic, m_listeners, m_logger, m_requiredHandlers, m_sr, m_state, m_versionFACTORY_VERSION_PROPERTY, INSTANCE_NAME_PROPERTY, INVALID, VALID| Constructor and Description |
|---|
CompositeFactory(org.osgi.framework.BundleContext context,
org.apache.felix.ipojo.metadata.Element metadata)
Create a composite factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(org.apache.felix.ipojo.metadata.Element metadata)
Check if the metadata are well formed.
|
ComponentInstance |
createInstance(java.util.Dictionary configuration,
IPojoContext context,
HandlerManager[] handlers)
Create an instance from the current factory.
|
java.lang.String |
getClassName() |
java.lang.String |
getFactoryName() |
java.util.List<IPojoFactory.RequiredHandler> |
getRequiredHandlerList()
Compute required handlers.
|
void |
reconfigure(java.util.Dictionary properties)
Reconfigure an existing instance.
|
void |
starting()
Start all the instance managers.
|
void |
stopping()
Stop all the instance managers.
|
addedService, addingService, defineClass, getBundleClassLoader, getComponentTypeDescription, getPojoMetadata, getVersion, loadClass, modifiedService, removedService, setUseFactoryClassloaderaddFactoryStateListener, checkAcceptability, computeDescription, computeFactoryState, createComponentInstance, createComponentInstance, deleted, dispose, disposed, getBundleContext, getComponentDescription, getComponentMetadata, getDescription, getHandler, getInstanceByName, getInstances, getInstancesNames, getIPOJOBundleContext, getLogger, getMissingHandlers, getName, getRequiredHandlers, getState, isAcceptable, match, removeFactoryStateListener, restart, start, stop, updatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddedService, addingService, modifiedService, removedServiceprotected Tracker m_tracker
public CompositeFactory(org.osgi.framework.BundleContext context,
org.apache.felix.ipojo.metadata.Element metadata)
throws ConfigurationException
context - : bundle contextmetadata - : metadata of the component to createConfigurationException - occurs when the element describing the factory is malformed.public void check(org.apache.felix.ipojo.metadata.Element metadata) throws ConfigurationException
check in class ComponentFactorymetadata - : metadataConfigurationException - occurs when the element describing the factory is malformed.ComponentFactory.check(org.apache.felix.ipojo.metadata.Element)public java.lang.String getClassName()
getClassName in interface FactorygetClassName in class ComponentFactorypublic java.util.List<IPojoFactory.RequiredHandler> getRequiredHandlerList()
getRequiredHandlerList in class ComponentFactorypublic void stopping()
stopping in class ComponentFactorypublic void starting()
starting in class ComponentFactorypublic ComponentInstance createInstance(java.util.Dictionary configuration, IPojoContext context, HandlerManager[] handlers) throws ConfigurationException
createInstance in class ComponentFactoryconfiguration - : instance configurationcontext - : bundle context to inject in the instance managerhandlers - : array of handler object to attached on the instanceConfigurationException - either the instance configuration or the instance starting has failedComponentFactory.createInstance(java.util.Dictionary, org.apache.felix.ipojo.IPojoContext, org.apache.felix.ipojo.HandlerManager[])public void reconfigure(java.util.Dictionary properties)
throws UnacceptableConfiguration,
MissingHandlerException
reconfigure in interface Factoryreconfigure in class IPojoFactoryproperties - : the new configuration to push.UnacceptableConfiguration - : occurs if the new configuration is
not consistent with the component type.MissingHandlerException - : occurs when an handler is unavailable when creating the instance.Factory.reconfigure(java.util.Dictionary)public java.lang.String getFactoryName()
getFactoryName in class ComponentFactoryCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.