Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) OSGi Alliance (2006, 2013). All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
// This document is an experimental draft to enable interoperability
// between bundle repositories. There is currently no commitment to
// turn this draft into an official specification.
package org.osgi.service.resolver;
A resolver service resolves the specified resources in the context supplied by the caller.

$Id: 809049a3954e50f9abbfca24fa4fda0d77d4f5b3 $
public interface Resolver {
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.

context The resolve context for the resolve operation. Must not be null.
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.
ResolutionException If the resolution cannot be satisfied.
New to GrepCode? Check out our FAQ X