Resolver
Date: 2016-06-25

org.osgi.service.resolver

## Interface Resolver

-     @ProviderType
      public interface Resolver

  A resolver service resolves the specified resources in the context supplied by the caller.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<org.osgi.resource.Resource,java.util.List<org.osgi.resource.Wire>>` | `resolve(ResolveContext context)` Resolve the specified resolve context and return any new resources and wires to the caller.

- - ### Method Detail

    - #### resolve

          java.util.Map<org.osgi.resource.Resource,java.util.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.