You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Architecture Handler

The architecture feature allows obtaining an architectural / component view of your systems. It exposes a snapshot of the present components, the state of these components, the state fo the dependencies ...
To use the arch command, you need to install the arch command bundle available here.

Reflection on the component

The architecture feature does some "reflection" on the iPOJO containers. It gathers information about the component (state, class name ...), dependencies (state, multiple, optional ...), provided services (state, properties) ... This information allows you to know why a component does not start, or why the component does not publish / provide a service.
Metadata
To allow the architecture to introspect the container, you need to add a attribute "architecture=true" to the component element:

<Component className="fr.imag.adele.escoffier.hello.impl.HelloServiceImpl" architecture="true">

By default, the architecture feature is disabled.

The "arch" command

A Felix command comes with the architecture handler. This command looks for all component exposing the architecture and print the information:

=> arch
Component : fr.imag.adele.escoffier.hello.impl.HelloServiceImpl - VALID
Dependency : org.osgi.service.log.LogService - RESOLVED - Optional : true - Multiple : false
Provides : fr.imag.adele.escoffier.hello.HelloService - REGISTERED
Service Property : floor_ = 2
Service Property : coucou = coucou
Service Property : empty = true
Service Property : language = fr
Component : fr.imag.adele.escoffier.hello.impl.HelloServiceImpl2 - VALID
Dependency : org.osgi.service.log.LogService - RESOLVED - Optional : true - Multiple : false
Provides : fr.imag.adele.escoffier.hello.HelloService - REGISTERED

Technical information

In fact, when a component enables the architecture introspection, its container exposes an Architecture service. Any architecture requester can obtain information about the component. For example, the arch command request all the architecture service and print the information.

Limitation and perspectives

The architecture feature use some implementation details of the different other features (Dependency, Provided service ...). Therefore, if you change the implementation of this feature, the architecture does not more work. Moreover, we are working one a graphical view of the architecture.

  • No labels