Versions Compared

Key

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

...

Most of the methods on this interface are self explanatory; however, the resolve() method is not. The resolve() method provides the virtual module its wiring context in the form of Wire objects. This allows the manager-owned class loader to implement proper OSGi class delegation. The bootWire parameter is a special wire that performs boot delegation, while the wires parameter performs normal delegation for imported packages and required bundles. The resolve() method is technically a setter method and is called by the framework when resolving the virtual module to inject its wires; however, the method may throw an exception if it cannot resolve at that time.

NOTE 1: Technically, we could merge bootWire into wires or we could eliminate wires and just have a single delegateWire that wraps the actual wires.

For clarity, the class- and resource-related methods take into account wiring delegation; the entry-related methods do not. This is similar for normal bundles.

NOTE 2: We could potentially use a dispose() method that is called when the framework is really done with the virtual module (i.e., when it is refreshed).

org.apache.felix.framework.ext.Wire

...