Versions Compared

Key

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

...

iPOJO is a component model on the top of OSGi™ OSGi? aiming to simplify the development of OSGi™ OSGi? applications. Moreover, iPOJO provide an extensibility mechanism allowing developers to extend the component model.

...

A composite can be represented as a service registry. Moreover, composite can be contained in other composite. The OSGi™ OSGi? service registry is the root composite.

...

Code Block
public interface HelloDispatcher{
              public void dispatch();
	      public String getLanguage();
	      public List<Person>getPersons();
}

...

Application Design

To implement this application, we can reuse existing service implementation. Indeed, we have on the shelf 3 "instantiable" services.

...

The service providing is realized by delegating invocation on servuces contained in the composition. If the delegating mapping cannot be discovered, the composition is invalidated. 

...

Morevoer, if a specification used to delegate is optional (and so not necessary providied in the composition at runtime), the implicated method should be declared as optional. An optional method is a method which can be non implemented at runtime. To declare an optional method, the service specification need to declare : "throw UnsupportMethodException". If a non optional method is delegated on an optional specification, a warning message is fired.

Code Block
<provides specification="...HelloHelloDispatcher"/>

Service Instantiation

A composite can instantiate a service inside the composition. The composite will track Factories able to create targeted specification providers. The create service is accessible only inside the composite (except if the service is exported). Created instance can be composite too. Each service to instantiate is represented in the composite description by a service element.

...