public interface Factory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FACTORY_VERSION_PROPERTY
Instance configuration can set the factory version they target using this property.
|
static java.lang.String |
INSTANCE_NAME_PROPERTY
Instance configuration can set the instance name using this property.
|
static int |
INVALID
Factory State.
|
static int |
VALID
Factory State.
|
Modifier and Type | Method and Description |
---|---|
void |
addFactoryStateListener(FactoryStateListener listener)
Adds a factory state listener on the current factory.
|
ComponentInstance |
createComponentInstance(java.util.Dictionary configuration)
Creates an instance manager (i.e.
|
ComponentInstance |
createComponentInstance(java.util.Dictionary configuration,
ServiceContext serviceContext)
Creates an instance manager (i.e.
|
org.osgi.framework.BundleContext |
getBundleContext()
Gets the bundle context of the factory.
|
java.lang.String |
getClassName()
Deprecated.
|
ComponentTypeDescription |
getComponentDescription()
Gets the component type description.
|
org.apache.felix.ipojo.metadata.Element |
getComponentMetadata()
Gets the component type metadata (Element - Attribute structure)
|
org.apache.felix.ipojo.metadata.Element |
getDescription()
Gets the component type information containing provided service,
configuration properties ...
|
java.util.List<ComponentInstance> |
getInstances()
Gets the list of instances created by the factory.
|
java.util.List<java.lang.String> |
getInstancesNames()
Gets the list of the names of the instances created by the factory.
|
java.util.List |
getMissingHandlers()
Gets the list of missing handlers.
|
java.lang.String |
getName()
Returns the factory name.
|
java.util.List |
getRequiredHandlers()
Get the list of required handlers.
|
int |
getState()
Returns the state of the factory.
|
java.lang.String |
getVersion()
Gets the version of the component type.
|
boolean |
isAcceptable(java.util.Dictionary conf)
Checks if the given configuration is acceptable as a configuration
of a component instance.
|
void |
reconfigure(java.util.Dictionary conf)
Reconfigures an instance already created.
|
void |
removeFactoryStateListener(FactoryStateListener listener)
Removes the given factory state listener from the listener list.
|
static final int VALID
static final int INVALID
static final java.lang.String INSTANCE_NAME_PROPERTY
static final java.lang.String FACTORY_VERSION_PROPERTY
ComponentInstance createComponentInstance(java.util.Dictionary configuration) throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException
configuration
- the configuration properties for this component.UnacceptableConfiguration
- if the given configuration is not valid.MissingHandlerException
- if an handler is missing.ConfigurationException
- if the instance configuration failed.ComponentInstance createComponentInstance(java.util.Dictionary configuration, ServiceContext serviceContext) throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException
configuration
- the configuration properties for this component.serviceContext
- the service context of the component.UnacceptableConfiguration
- if the given configuration is not valid.MissingHandlerException
- if an handler is missing.ConfigurationException
- if the instance configuration failed.org.apache.felix.ipojo.metadata.Element getDescription()
ComponentTypeDescription getComponentDescription()
boolean isAcceptable(java.util.Dictionary conf)
conf
- the configuration to testtrue
if the configuration is acceptablejava.lang.String getName()
void reconfigure(java.util.Dictionary conf) throws UnacceptableConfiguration, MissingHandlerException
conf
- the configuration to reconfigure the instance. The instance.name property must be set to identify
the instance to reconfigure.UnacceptableConfiguration
- if the given configuration is not consistent for the targeted instance.MissingHandlerException
- if an handler is missing.void addFactoryStateListener(FactoryStateListener listener)
listener
- the listener to addvoid removeFactoryStateListener(FactoryStateListener listener)
listener
- the listener to removejava.util.List getMissingHandlers()
java.util.List getRequiredHandlers()
java.lang.String getClassName()
int getState()
org.osgi.framework.BundleContext getBundleContext()
java.lang.String getVersion()
null
if
not specified.org.apache.felix.ipojo.metadata.Element getComponentMetadata()
java.util.List<ComponentInstance> getInstances()
java.util.List<java.lang.String> getInstancesNames()
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.