Versions Compared

Key

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

...

iPOJO is an extensible, service-oriented component model implemented on the top of the OSGi? OSGi™ framework that aims to simplify the development of OSGi? OSGi™ applications. iPOJO follows a POJO-based component approach using external metadata to describe how POJO components should be managed by the iPOJO runtime. Some of the standard features of iPOJO include automatic service dependency management, service publication, and configuration property injection.

...

A composite can be thought of as a service registry or a scoping mechanism of the global OSGi? OSGi™ service registry. Composites can contain other composite, creating a hierarchy of service registries. The OSGi? OSGi™ service registry is the root composite.

...

Code Block
<composite name="HelloComposition">
    <import<requires specification="org.apache.felix.ipojo.composition.ex1.person.Person" aggregate="true"/>
    <service specification="org.apache.felix.ipojo.composition.ex1.hello.Hello"/>
    <service specification="org.apache.felix.ipojo.composition.ex1.say.Dispatcher"/>
    <service specification="org.apache.felix.ipojo.composition.ex1.directory.Directory"/>
    <provides specification="org.apache.felix.ipojo.composition.ex1.compo.HelloDispatcher"/>
</composite>

...

The following subsections define the various concepts and features of iPOJO's composite components.

Service

...

Requirement

The composite can import services from the parent composite. Each import requirement is describe by an <import> <requires> element in the composite description. An imported sub-service must specify the target service specification. Additionally, imported sub-services can specify:

  • Cardinality: Indicates whether a single provider instance is imported or an aggregated set of the available providers instances is imported.
  • Optionality: Indicates whether the imported sub-service is optional or mandatory.
  • Filtering: Indicates how the services available in the parent composite can be further filtered using an LDAP expression evaluated over their service properties.
Code Block
<import<requires specification="org.apache.felix.ipojo.test.scenarios.service.Hello"
 optional="true" aggregate="true" filter="(language=en)"/>

...