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 Factory
configuration
- : 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 Factory
configuration
- : 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 Factory
Factory.getDescription()
public java.lang.String getName()
getName
in interface Factory
Factory.getName()
public boolean isAcceptable(java.util.Dictionary conf)
isAcceptable
in interface Factory
conf
- : the configuration to testFactory.isAcceptable(java.util.Dictionary)
public void reconfigure(java.util.Dictionary conf) throws UnacceptableConfiguration, MissingHandlerException
reconfigure
in interface Factory
conf
- : 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 Factory
listener
- : the listener to add.Factory.addFactoryStateListener(org.apache.felix.ipojo.FactoryStateListener)
public java.util.List getMissingHandlers()
getMissingHandlers
in interface Factory
public java.util.List getRequiredHandlers()
getRequiredHandlers
in interface Factory
public void removeFactoryStateListener(FactoryStateListener listener)
removeFactoryStateListener
in interface Factory
listener
- : the listener to removeFactory.removeFactoryStateListener(org.apache.felix.ipojo.FactoryStateListener)
public ComponentTypeDescription getComponentDescription()
getComponentDescription
in interface Factory
public java.lang.String getClassName()
getClassName
in interface Factory
public org.osgi.framework.BundleContext getBundleContext()
getBundleContext
in interface Factory
public java.lang.String getVersion()
getVersion
in interface Factory
public org.apache.felix.ipojo.metadata.Element getComponentMetadata()
getComponentMetadata
in interface Factory
public java.util.List<ComponentInstance> getInstances()
getInstances
in interface Factory
public java.util.List<java.lang.String> getInstancesNames()
getInstancesNames
in interface Factory
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.