public class FactoryProxy extends java.lang.Object implements Factory
FACTORY_VERSION_PROPERTY, INSTANCE_NAME_PROPERTY, INVALID, VALID| Constructor and Description |
|---|
FactoryProxy(Factory fact,
ServiceContext svcContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFactoryStateListener(FactoryStateListener listener)
Add a factory listener.
|
ComponentInstance |
createComponentInstance(java.util.Dictionary configuration)
Create an instance manager (i.e.
|
ComponentInstance |
createComponentInstance(java.util.Dictionary configuration,
ServiceContext serviceContext)
Create an instance manager (i.e.
|
org.osgi.framework.BundleContext |
getBundleContext() |
java.lang.String |
getClassName() |
ComponentTypeDescription |
getComponentDescription() |
org.apache.felix.ipojo.metadata.Element |
getComponentMetadata() |
org.apache.felix.ipojo.metadata.Element |
getDescription()
Get the component type information containing provided service, configuration properties ...
|
java.util.List<ComponentInstance> |
getInstances() |
java.util.List<java.lang.String> |
getInstancesNames() |
java.util.List |
getMissingHandlers() |
java.lang.String |
getName()
Return the factory name.
|
java.util.List |
getRequiredHandlers() |
int |
getState() |
java.lang.String |
getVersion() |
boolean |
isAcceptable(java.util.Dictionary conf)
Check if the given configuration is acceptable as a configuration of a component instance.
|
void |
reconfigure(java.util.Dictionary conf)
Reconfigure an instance already created.
|
void |
removeFactoryStateListener(FactoryStateListener listener)
Remove a service listener.
|
public FactoryProxy(Factory fact, ServiceContext svcContext)
fact - : the targeted factory.svcContext - : the service context to target.public ComponentInstance createComponentInstance(java.util.Dictionary configuration) throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException
createComponentInstance in interface Factoryconfiguration - : the configuration properties for this component.UnacceptableConfiguration - : when a given configuration is not valid.MissingHandlerException - : occurs when the creation failed due to a missing handler (the factory should be invalid)ConfigurationException - : occurs when the creation failed due to a configuration issueFactory.createComponentInstance(java.util.Dictionary)public ComponentInstance createComponentInstance(java.util.Dictionary configuration, ServiceContext serviceContext) throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException
createComponentInstance in interface Factoryconfiguration - : the configuration properties for this component.serviceContext - : the service context of the component.UnacceptableConfiguration - : when the given configuration is not valid.MissingHandlerException - : when at least one handler is missing.ConfigurationException - : when an issue occurs during the oconfiguration of the instance.Factory.createComponentInstance(java.util.Dictionary, org.apache.felix.ipojo.ServiceContext)public org.apache.felix.ipojo.metadata.Element getDescription()
getDescription in interface FactoryFactory.getDescription()public java.lang.String getName()
getName in interface FactoryFactory.getName()public boolean isAcceptable(java.util.Dictionary conf)
isAcceptable in interface Factoryconf - : the configuration to testFactory.isAcceptable(java.util.Dictionary)public void reconfigure(java.util.Dictionary conf)
throws UnacceptableConfiguration,
MissingHandlerException
reconfigure in interface Factoryconf - : the configuration to reconfigure the instance.UnacceptableConfiguration - : if the given configuration is not consistent for the targeted instance.MissingHandlerException - : when at least one handler is missingFactory.reconfigure(java.util.Dictionary)public void addFactoryStateListener(FactoryStateListener listener)
addFactoryStateListener in interface Factorylistener - : the listener to add.Factory.addFactoryStateListener(org.apache.felix.ipojo.FactoryStateListener)public java.util.List getMissingHandlers()
getMissingHandlers in interface Factorypublic java.util.List getRequiredHandlers()
getRequiredHandlers in interface Factorypublic void removeFactoryStateListener(FactoryStateListener listener)
removeFactoryStateListener in interface Factorylistener - : the listener to removeFactory.removeFactoryStateListener(org.apache.felix.ipojo.FactoryStateListener)public ComponentTypeDescription getComponentDescription()
getComponentDescription in interface Factorypublic java.lang.String getClassName()
getClassName in interface Factorypublic org.osgi.framework.BundleContext getBundleContext()
getBundleContext in interface Factorypublic java.lang.String getVersion()
getVersion in interface Factorypublic org.apache.felix.ipojo.metadata.Element getComponentMetadata()
getComponentMetadata in interface Factorypublic java.util.List<ComponentInstance> getInstances()
getInstances in interface Factorypublic java.util.List<java.lang.String> getInstancesNames()
getInstancesNames in interface FactoryCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.