Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • the service publication
  • the component instance / service object creation
  • the service unregistering

Handler overviewImage Added

A simple example

...

Code Block
xml
xml
<component className="...FooProviderType1">
            <provides/>
</component>

Handler providing a Foo ServiceImage Added

The <provides/> element suffice to declare that each instance of this type will provide the FooService. Indeed, the provided interface can be discovered by analyzing the implementation class.

...

Code Block
xml
xml
<component className="...FooProviderType1">
            <provides interface="{...FooService, ...BarService}"/>
</component>

Instance providing the Foo service and the Bar serviceImage Added

Note: if you use the interface attribute, the handler check that all declared interface are really implemented by the implementation class. If an interface is not implemented, the handler throws an error.

...

The second property is published with the name intProps. This property is not attached to a field, so, we need to declare the property type. All primitive types or objects can be used has property type (for object, the qualified name of the class is used as java.lang.String).

Service Properties PublicationImage Added

The implementation class set a new value to the m_foo field in the code. When this action occurs, the handler will modify the service publication to update the foo property published value. If a published property value becomes null, the property is unpublished since it has a new value.

Service Properties UpdateImage Added

If property does not have default value, the instance configuration needs to set a value for each unvalued property. Moreover, the instance can override the property value. The following xml snippet shows the declaration of an instance overriding the property values:

Code Block
xml
xml
<instance component="...FooProviderType1" name="myFooServiceProvider">
            <property name="foo" value="baz"/>
            <property name="intProps" value="2"/>
</instance>

Instance ConfigurationImage Added

Advanced features

...

Code Block
<component className="...FooProviderType1">
                <provides interface="...Foo"/>
                <provides interface="...Bar">
                               <property name="foo" value="baz"/>
                </provides>
</component>

Several publications for one instanceImage Added

Service Property Propagation

The configuration handler has the possibility to propagate received properties to service publication. So, when the propagation is activated, all properties received by the configuration handler will be propagated to all published service.

Properties propagationImage Added

Instance reconfiguration

...