Interface Resolver

All Known Implementing Classes:
ResolverImpl

public interface Resolver
A resolver service resolves the specified resources in the context supplied by the caller.
Version:
$Id: dfb89b8d09af62ecf62321b80d7e2310512f27a1 $
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>>
    Resolve the specified resolve context and return any new resources and wires to the caller.
  • Method Details

    • resolve

      Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> resolve(ResolveContext context) throws ResolutionException
      Resolve the specified resolve context and return any new resources and wires to the caller.

      The resolver considers two groups of resources:

      • Mandatory - any resource in the mandatory group must be resolved. A failure to satisfy any mandatory requirement for these resources will result in throwing a ResolutionException
      • Optional - any resource in the optional group may be resolved. A failure to satisfy a mandatory requirement for a resource in this group will not fail the overall resolution but no resources or wires will be returned for that resource.

      The resolve method returns the delta between the start state defined by ResolveContext.getWirings() and the end resolved state. That is, only new resources and wires are included.

      The behavior of the resolver is not defined if the specified resolve context supplies inconsistent information.

      Parameters:
      context - The resolve context for the resolve operation. Must not be null.
      Returns:
      The new resources and wires required to satisfy the specified resolve context. The returned map is the property of the caller and can be modified by the caller.
      Throws:
      ResolutionException - If the resolution cannot be satisfied.