|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.Handler
org.apache.felix.ipojo.PrimitiveHandler
org.apache.felix.ipojo.handlers.configuration.ConfigurationHandler
public class ConfigurationHandler
Handler managing the Configuration Admin.
Field Summary |
---|
Fields inherited from class org.apache.felix.ipojo.PrimitiveHandler |
---|
HANDLER_TYPE |
Fields inherited from class org.apache.felix.ipojo.Handler |
---|
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid |
Constructor Summary | |
---|---|
ConfigurationHandler()
|
Method Summary | |
---|---|
protected void |
addProperty(Property prop)
Adds the given property metadata to the property metadata list. |
void |
configure(Element metadata,
Dictionary configuration)
Configures the handler. |
protected boolean |
containsProperty(String name)
Checks if the list contains the property. |
HandlerDescription |
getDescription()
Gets the configuration handler description. |
void |
initializeComponentFactory(ComponentTypeDescription desc,
Element metadata)
Initialize the component type. |
void |
onCreation(Object instance)
Handler createInstance method. |
void |
reconfigure(Dictionary configuration)
Reconfigure the component instance. |
void |
reconfigureProperty(Property prop,
Object value)
Reconfigures the given property with the given value. |
void |
start()
Start method. |
void |
stop()
Stop method. |
void |
updated(Dictionary conf)
Managed Service method. |
Methods inherited from class org.apache.felix.ipojo.PrimitiveHandler |
---|
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onEntry, onError, onExit, onFinally, onGet, onSet, setFactory |
Methods inherited from class org.apache.felix.ipojo.Handler |
---|
debug, error, error, getHandlerManager, getValidity, info, isValid, setValidity, stateChanged, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationHandler()
Method Detail |
---|
public void initializeComponentFactory(ComponentTypeDescription desc, Element metadata) throws ConfigurationException
initializeComponentFactory
in class Handler
desc
- : 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(Element metadata, Dictionary configuration) throws ConfigurationException
configure
in class Handler
metadata
- the metadata of the componentconfiguration
- the instance configuration
ConfigurationException
- one property metadata is not correctorg.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.InstanceManager,
org.apache.felix.ipojo.metadata.Element)
public void stop()
stop
in class Handler
Handler.stop()
public void start()
start
in class Handler
Handler.start()
protected void addProperty(Property prop)
prop
- : property metadata to addprotected boolean containsProperty(String name)
name
- : name of the property
public void reconfigure(Dictionary configuration)
reconfigure
in class Handler
configuration
- : the new configurationHandler.reconfigure(java.util.Dictionary)
public void reconfigureProperty(Property prop, 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(Object instance)
onCreation
in class PrimitiveHandler
instance
- : the created objectorg.apache.felix.ipojo.Handler#onCreation(java.lang.Object)
public void updated(Dictionary conf) throws ConfigurationException
updated
in interface ManagedService
conf
- : pushed configuration.
ConfigurationException
- the reconfiguration failed.ManagedService.updated(java.util.Dictionary)
public HandlerDescription getDescription()
getDescription
in class Handler
Handler.getDescription()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |