Versions Compared

Key

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

...

Code Block
xml
xml
<component classNameclassname="...FooProviderType1">
            <provides specifications="...FooService "/>
</component>

...

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

...

Code Block
xml
xml
<component classNameclassname="...FooProviderType1">
            <provides>
                        <property name="foo" field="m_foo" value="Foo"/>
                        <property name="intProps" type="int" value="5"/>
            </provides>
</component>

...

You can declare several provides inside the same component. All this provided service will be manage by the same handler but separately. Several services will be published (with different service registrations). This case is useful when service properties are different for the different services.

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

...

It is also possible to expose concrete and abstract class as services. To to this, just specify the published class in the specification attribute:

Code Block
<component classNameclassname="...FooProviderType1">
                <provides specifications="...AbstractFoo"/>
</component>
<component classNameclassname="...FooBarProviderType1">
                <provides specifications="[...AbstractFoo, ...Bar]"/>
</component>

...