|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.ipojo.IPojoFactory
org.apache.felix.ipojo.ComponentFactory
org.apache.felix.ipojo.composite.CompositeFactory
public class CompositeFactory
The component factory manages component instance objects. This management consist in creating and managing component instance build with the component factory. This class could export Factory and ManagedServiceFactory services.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.felix.ipojo.IPojoFactory |
|---|
IPojoFactory.RequiredHandler |
| Field Summary | |
|---|---|
protected Tracker |
m_tracker
Tracker used to track required handler factories. |
| Fields inherited from class org.apache.felix.ipojo.IPojoFactory |
|---|
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 |
| Fields inherited from interface org.apache.felix.ipojo.Factory |
|---|
INVALID, VALID |
| Constructor Summary | |
|---|---|
CompositeFactory(org.osgi.framework.BundleContext context,
Element metadata)
Create a composite factory. |
|
| Method Summary | |
|---|---|
void |
check(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()
Gets the class name. |
java.lang.String |
getFactoryName()
Computes the factory name. |
java.util.List |
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. |
| Methods inherited from class org.apache.felix.ipojo.ComponentFactory |
|---|
addedService, addingService, defineClass, getBundleClassLoader, getComponentTypeDescription, getPojoMetadata, getResource, getVersion, loadClass, modifiedService, removedService |
| Methods inherited from class org.apache.felix.ipojo.IPojoFactory |
|---|
addFactoryStateListener, checkAcceptability, computeDescription, computeFactoryState, createComponentInstance, createComponentInstance, deleted, disposed, generateName, getBundleContext, getComponentDescription, getDescription, getHandler, getIPOJOBundleContext, getLogger, getMissingHandlers, getName, getRequiredHandlers, getState, isAcceptable, match, removeFactoryStateListener, start, stop, updated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.felix.ipojo.util.TrackerCustomizer |
|---|
addedService, addingService, modifiedService, removedService |
| Field Detail |
|---|
protected Tracker m_tracker
| Constructor Detail |
|---|
public CompositeFactory(org.osgi.framework.BundleContext context,
Element metadata)
throws ConfigurationException
context - : bundle contextmetadata - : metadata of the component to create
ConfigurationException - occurs when the element describing the factory is malformed.| Method Detail |
|---|
public void check(Element metadata)
throws ConfigurationException
check in class ComponentFactorymetadata - : metadata
ConfigurationException - occurs when the element describing the factory is malformed.ComponentFactory.check(org.apache.felix.ipojo.metadata.Element)public java.lang.String getClassName()
ComponentFactory
getClassName in interface FactorygetClassName in class ComponentFactoryIPojoFactory.getClassName()public java.util.List getRequiredHandlerList()
getRequiredHandlerList in class ComponentFactorypublic void stopping()
stopping in class ComponentFactorypublic void starting()
starting in class ComponentFactory
public 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 instance
ConfigurationException - 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()
ComponentFactory
getFactoryName in class ComponentFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||