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_PRIMITIVE
INSTANCE_NAME, m_componentDesc, m_componentInstances, m_componentMetadata, m_context, m_factoryName, m_isPublic, m_listeners, m_logger, m_requiredHandlers, m_sr, m_state, m_version
FACTORY_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, setUseFactoryClassloader
addFactoryStateListener, 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, updated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addedService, addingService, modifiedService, removedService
protected 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 ComponentFactory
metadata
- : 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 Factory
getClassName
in class ComponentFactory
public java.util.List<IPojoFactory.RequiredHandler> getRequiredHandlerList()
getRequiredHandlerList
in class ComponentFactory
public void stopping()
stopping
in class ComponentFactory
public void starting()
starting
in class ComponentFactory
public ComponentInstance createInstance(java.util.Dictionary configuration, IPojoContext context, HandlerManager[] handlers) throws ConfigurationException
createInstance
in class ComponentFactory
configuration
- : 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 Factory
reconfigure
in class IPojoFactory
properties
- : 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 ComponentFactory
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.