Title: iPOJO-Reference-Card
# Declaring component types
XML:
:::xml
Attribute name | Required | Default value | Description |
---|---|---|---|
classname | yes | indicates the implementation class (automatic when using annotations). | |
name | no | the implementation class name | specifies the component class name |
Attribute name | Required | Default value | Description |
---|---|---|---|
component | yes | specifies the component type (either by using the name or the class name) | |
name | no | generated | specifies the instance name. |
Attribute name | Required | Default value | Description |
---|---|---|---|
specifications | no | all implemented interfaces | specifies the published service interfaces |
strategy | no | `singleton` | specifies the service object creation policy among `singleton`, `service` (OSGi Service Factory), `method` (use the factory method), `instance` (an object per instance) |
Attribute name | Required | Default value | Description |
---|---|---|---|
name | no | the field name | specifies the published property name |
mandatory | no | false | specifies if the property has to receive a value from the instance configuration |
value | no | specifies the default property value | |
field | no | (automatic with annotations) | specifies the injected field |
type | only if there is no fields | specified the property type |
Attribute name | Required | Default value | Description |
---|---|---|---|
id | no | field name | dependency id |
field | no | automatically detected with annotations | injected field |
optional | no | false | specifies if the dependency if optional |
aggregate | no | false (automatically detected with fields) |
specifies if the dependency is aggregate of scalar |
specification | yes/no | can be discovered from the code | specifies the required service specification. This attribute is required when the service type cannot be inferred from the code (Collection type for fields, callbacks without service objects) |
filter | no | no filter | specifies the dependency LDAP filter |
from | no | specifies a specific provider by its name | |
policy | no | dynamic | specifies the binding policy among dynamic, static and dynamic-priority |
nullable | no | true | enables/disables nullable object injection for optional dependencies |
default-implementation // defaultimplementation for annotations | no | specifies the default-implementation for optional dependencies | |
comparator | no | specifies the comparator class used to sort service providers |