Hi,
So, each @ServiceProperty is one entry of dictionary attached to the
service registration. If the field value is updated (by your code), iPOJO
also updates the published value.
For properties that are not attached to fields, you can also use:
@Provides(properties= {
@StaticServiceProperty(name="p1", type="java.lang.String", value="this
is a property")
@StaticServiceProperty(name="p2",
type="java.lang.String", value="this is another property")
})
Regards,
Clement
On 18.02.11 18:06, "Carl Hall" <[email protected]> wrote:
>@ServiceProperty can be applied to multiple fields in a class, but can
>only
>be applied once per field.
>
>This differs from the SCR annotations that also allow multiple properties
>to
>be set at the type (class, interface) level.
>
>On Fri, Feb 18, 2011 at 10:22 AM, Pierre Henry Perret
><[email protected]>wrote:
>
>> ok,
>>
>> So why the @ServiceProperty allows only one annotation, if many
>>properties
>> cans be defined in a Dictionary , (as usually is the case in a service)
>>
>> --
>> Pierre
>>
>> 2011/2/18 Guillaume Sauthier <[email protected]>
>>
>> If using @ServiceProperty, you will add an entry in that Dictionary.
>> > --G
>> >
>> > Le 18/02/2011 15:27, Pierre Henry Perret a écrit :
>> >
>> > Hi all,
>> >>
>> >> When a service is registered via the registration service , a
>>Dictionary
>> >> of
>> >> properties is passed.
>> >> What is the equivalence of this metadata Dictionary ?
>> >> Is that @ServiceProperty ?
>> >>
>> >> Thanls
>> >>
>> >>
>> >> --
>> >> Pierre-Henry Perret
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [email protected]
>> > For additional commands, e-mail: [email protected]
>> >
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]