...
The configuration handler aims to manage component configuration. This handler allows the OSGi configuration admin to push a configuration to a componentcreate, destroy or update instances. A configuration is a set of couple (name, value). The name can be a field name or a property name associated to a field or/and a method.
Configurable Property configuration
Not all the component instances are configurable. A component set type sets its configurable part properties by adding in this metadata a ConfigurableProperty element. These properties are not necessarily service property but can be internal component property. Moreover, there are not declared inside a Provides element but directly under the Component element.
Examples
XML Metadata
Code Block |
---|
<iPOJO>
<Component |
Panel |
<?xml version="1.0" encoding="UTF-8"?> <iPOJO> <Component className="fr.imag.adele.escoffier.hello.impl.HelloServiceImpl"> <Provides> <Property <Provides> <Property name="foo" field="m_foo"/> </Provides> <Properties configurable="true"/> <Property <Property name="foo" field="m_foo"/> <Property <Property name="array" field="my_array"/> <Properties <Properties name="hello.language" type="java.lang.String"/> </Properties> </Component> <instance component="fr.imag.adele.escoffier.hello.impl.HelloServiceImpl" name="HelloService"> <property name="foo" value="bar"/> <property name="array" value="\{1, 2, 3}"/> <property name="hello.language" value="en"/> </instance> instance </iPOJO> |
In the previous snippet, you can see three configurable properties. The first is a configurable property attached to the field foo that is a service property too. The second is an array property. The third property is a static property, in the sense that no field is attached to this property.
...