Weasis Architecture

Weasis has a modular architecture based on OSGi: the dynamic module system for Java. It uses the Apache Felix OSGi framework which is an open source implementation of the OSGi specification.

The following schemas show the main different plug-in types (bundle in OSGi language) and their relationships. Viewer, Viewer Tool Pane, Tool Bar, Data Explorer and Codec bundles are registered dynamically by the Declarative Services (a way to push or to consume services in OSGi environment).

OSGI plug-ins Weasis Launcher and Apache Felix OSGi framework Codec [Codec] Data Explorer [DataExplorerView,ExplorerModel] Weasis Core Weasis Base UI (UI plug-ins aggregator) Viewer [ViewerPlugin] Viewer Tool Pane [DockableTool] Tool Bar [Toolbar] [...] = Java abstract class or interface to implement Web Browser Desktop App Mime Type Open a viewer related to the mime type Weasis protocol (URI) Mime types / Extensions

packages packages

For each bundle, translation files are packaging in a separated bundle ending by ā€œi18nā€ called a bundle fragment (OSGi concept) which is merged during runtime to the application. In this way, translation can be handled separately and they are automatically loaded by the application when they are available.

Some Codec bundles also have bundle fragments. Those fragments contain native libraries (JNI wrapping). The Weasis launcher enables downloading and loading only the native binaries related to the running platform.