...
- specifications: defines the provided interface (optional, default = all implemented interfaces)
- strategy : the service object creation strategy. Possible values : SINGLETON, SERVICE, METHOD, INSTANCE or the strategy class name. With SINGLETON there is only one POJO per component instance, SERVICE means OSGi Service factory, METHOD delegates the creation to the factory-method of the component, INSTANCE creates one service object per requiring instance. For other strategies, specify the qualified name of the CreationStrategy class. (optional, default = SINGLETON)
Info | ||
---|---|---|
| ||
The "SERVICE" strategy means OSGi service factory. So, one service object per asking bundle will be created. |
Info | ||
---|---|---|
| ||
The |
@Requires
Goal: Defines a service dependency
Target: Field
Attributes:
- Filter: defines the LDAP filter (optional)
- Optional: defines if the dependency is optional (optional, default = "false")
- Id: defines the dependency Id (useful to identify bind & unbind methods) (optional, default = field name) (if a dependency with the same id is already created (by a @bind or @unbind annotation), it merges the dependencies).
- Nullable: enable or disable the Null Object injection when the dependency is optional and no providers are available (optional, default = "true")
- Default-Implementation: set the Default-Implmentation (optional, by default iPOJO uses a Null object)
- Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
- Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
- From : defines the specific provider to use
- Specification : the required service specification. This attribute is required for Collection field. (optional, default = annotated field type).
@ServiceProperty
HTML |
---|
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
<img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>OSGi Service Factory</b>
</div>
</div>
<div class="box-blue-content">
The <tt>SERVICE</tt> strategy means OSGi service factory. So, one service object per asking bundle will be created.
</div>
<div class="box-blue-footer"></div>
</div>
|
HTML |
---|
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
<img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>Changes between the 1.0.0 and the 1.2.0</b>
</div>
</div>
<div class="box-blue-content">
The <tt>factory</tt> attribute became <tt>strategy</tt>. A third policy is now available (<tt>instance</tt>) allowing to create one service object per asking instance. Moreover, it is also possible to indicates the <tt>CreationStrategy</tt> class name.
</div>
<div class="box-blue-footer"></div>
</div>
|
@Requires
Goal: Defines a service dependencyGoal: Defines a service property
Target: Field
Attributes:
- Filter: defines the LDAP filter (optional)
- Optional: defines if the dependency is optional
- name: property name (optional, default=field name
- value: property value (optional, default = no value"false")mandatory
- Id: is the property mandatory? defines the dependency Id (useful to identify bind & unbind methods) (optional, default = false)
Info | ||
---|---|---|
| ||
A mandatory property must receive a value either from the component type description ( |
@Property
Goal: Defines a property
Target: Field or Method
Attributes:
- name: property name (optional, default=field name computed by removing "set" from the method name (for instance setFoo(String ff) will get the Foo name))
- value: property value (optional, default=no value)
- mandatory : is the property mandatory? (optional, default=false)
...
title | Field and Method |
---|
...
- field name) (if a dependency with the same id is already created (by a @bind or @unbind annotation), it merges the dependencies).
- Nullable: enable or disable the Null Object injection when the dependency is optional and no providers are available (optional, default = "true")
- Default-Implementation: set the Default-Implmentation (optional, by default iPOJO uses a Null object)
- Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
- Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
- From : defines the specific provider to use
- Specification : the required service specification. This attribute is required for Collection field. (optional, default = annotated field type).
@ServiceProperty
Goal: Defines a service property
Target: Field
Attributes:
- name: property name (optional, default=field name
- value: property value (optional, default=no value)
- mandatory : is the property mandatory? (optional, default=false)
HTML |
---|
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
<img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>Mandatory property</b>
</div>
</div>
<div class="box-blue-content">
A mandatory property must receive a value either from the component type description (<tt>value</tt> attribute, or the instance configuration.
</div>
<div class="box-blue-footer"></div>
</div>
|
@Property
Goal: Defines a property
Target: Field or Method
Attributes:
- name: property name (optional, default=field name computed by removing "set" from the method name (for instance setFoo(String ff) will get the Foo name))
- value: property value (optional, default=no value)
- mandatory : is the property mandatory? (optional, default=false)
HTML |
---|
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
<img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>Field and Method</b>
</div>
</div>
<div class="box-blue-content">
If another property with the same name is defined the method or the field is added to the existing property.
</div>
<div class="box-blue-footer"></div>
</div>
|
Wiki Markup |
---|
@Updated *\[ News in the 1.3.0-SNAPSHOT version \]* |
...