The Quasi Framework has the following interfaces:
- QuasiFrameworkFactory with methods to create a quasi framework based on a snapshot of the current OSGi framework state and the region digraph or by reading a directory containing dumps of the OSGi framework state and of the region digraph.
- QuasiFramework with methods to:
- install a bundle into the quasi framework (as a quasi bundle, meaning it only exists in the quasi framework)
- inquire the quasi framework
- attempt to resolve the quasi bundles
- diagnose why a particular quasi bundle failed to resolve
- commit all the quasi bundles by installing corresponding bundles in the OSGi framework
- destroy the quasi framework by deleting any associated coregion (described below).
A quasi framework contains a state snapshot of either the "live" framework state or the state of a framework that was dumped, e.g. on a resolution failure. But the region digraph contained in a quasi framework is either a snapshot in the case where the quasi framework was constructed from a dump directory or is the "live" region digraph if the quasi framework was constructed from the current OSGi framework state.
The two main use cases for the quasi framework are installing bundles into a "side state" and automatically installing missing dependencies from the Virgo repository and analysing a dump produced by a resolution failure. The latter use case is completely offline in the sense that live state is not affected. The former use case is offline with respect to the OSGi framework state (unless and until the quasi framework state is committed to the OSGi framework) and is online with respect to the region digraph. Because of the way the region digraph is implemented in terms of OSGi framework hooks with global effects, it was not straightforward to create a snapshot of the region digraph for use during resolution. Instead the quasi framework creates a temporary "coregion" to contain any quasi bundles installed into the quasi framework. Since the bundle ids of quasi bundles are not valid in the live OSGi framework, it is unlikely that the coregion could be abused even if some other part of the system noticed its existence and read its contents (i.e. the bundle ids in the coregion). The coregion is deleted when the quasi framework is cleaned up.