public class ConfigurationHandler extends PrimitiveHandler implements org.osgi.service.cm.ManagedService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MANAGED_SERVICE_PID |
HANDLER_TYPEHANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid| Constructor and Description |
|---|
ConfigurationHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConfigurationListener listener)
Add the given listener to the configuration handler's list of listeners.
|
protected void |
addProperty(Property prop)
Adds the given property metadata to the property metadata list.
|
void |
configure(org.apache.felix.ipojo.metadata.Element metadata,
java.util.Dictionary configuration)
Configures the handler.
|
HandlerDescription |
getDescription()
Gets the configuration handler description.
|
void |
initializeComponentFactory(ComponentTypeDescription desc,
org.apache.felix.ipojo.metadata.Element metadata)
Initialize the component type.
|
void |
onCreation(java.lang.Object instance)
Handler createInstance method.
|
void |
reconfigure(java.util.Dictionary configuration)
Reconfigure the component instance.
|
java.lang.Object |
reconfigureProperty(Property prop,
java.lang.Object value)
Reconfigures the given property with the given value.
|
void |
removeListener(ConfigurationListener listener)
Remove the given listener from the configuration handler's list of listeners.
|
void |
start()
Start method.
|
void |
stateChanged(int state)
This method is called when the component state changed.
|
void |
stop()
Stop method.
|
void |
updated(java.util.Dictionary conf)
Managed Service method.
|
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onEntry, onError, onExit, onFinally, onGet, onSet, setFactorydebug, error, error, getHandlerManager, getValidity, info, isValid, setValidity, warn, warnpublic static final java.lang.String MANAGED_SERVICE_PID
public void initializeComponentFactory(ComponentTypeDescription desc, org.apache.felix.ipojo.metadata.Element metadata) throws ConfigurationException
initializeComponentFactory in class Handlerdesc - : component type description to populate.metadata - : component type metadata.ConfigurationException - : metadata are incorrect.Handler.initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentTypeDescription, org.apache.felix.ipojo.metadata.Element)public void configure(org.apache.felix.ipojo.metadata.Element metadata,
java.util.Dictionary configuration)
throws ConfigurationException
configure in class Handlermetadata - the metadata of the componentconfiguration - the instance configurationConfigurationException - one property metadata is not correctHandler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)public void stop()
stop in class HandlerHandler.stop()public void start()
start in class HandlerHandler.start()protected void addProperty(Property prop)
prop - : property metadata to addpublic void reconfigure(java.util.Dictionary configuration)
reconfigure in class Handlerconfiguration - : the new configurationHandler.reconfigure(java.util.Dictionary)public java.lang.Object reconfigureProperty(Property prop, java.lang.Object value)
InstanceManager.onSet(Object, String, Object)
call and the callback invocation.
The reconfiguration occurs only if the value changes.prop - the property object to reconfigurevalue - the new value.public void onCreation(java.lang.Object instance)
onCreation in class PrimitiveHandlerinstance - : the created objectPrimitiveHandler.onCreation(Object)public void updated(java.util.Dictionary conf)
throws org.osgi.service.cm.ConfigurationException
updated in interface org.osgi.service.cm.ManagedServiceconf - : pushed configuration.org.osgi.service.cm.ConfigurationException - the reconfiguration failed.ManagedService.updated(java.util.Dictionary)public HandlerDescription getDescription()
getDescription in class HandlerHandler.getDescription()public void addListener(ConfigurationListener listener)
listener - the ConfigurationListener object to be addedjava.lang.NullPointerException - if listener is nullpublic void removeListener(ConfigurationListener listener)
listener - the ConfigurationListener object to be removedjava.lang.NullPointerException - if listener is nullpublic void stateChanged(int state)
HandlerstateChanged in class Handlerstate - the new instance state ComponentInstanceCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.