Constructor and Description |
---|
ResolverImpl(Logger logger) |
Modifier and Type | Method and Description |
---|---|
Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> |
resolve(ResolveContext rc)
Resolve the specified resolve context and return any new resources and
wires to the caller.
|
Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> |
resolve(ResolveContext rc,
org.osgi.resource.Resource host,
org.osgi.resource.Requirement dynamicReq,
List<org.osgi.resource.Capability> matches)
Resolves a dynamic requirement for the specified host resource using the
specified
ResolveContext . |
public ResolverImpl(Logger logger)
public Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> resolve(ResolveContext rc) throws ResolutionException
Resolver
The resolver considers two groups of resources:
mandatory group
must be
resolved. A failure to satisfy any mandatory requirement for these
resources will result in throwing a ResolutionException
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.
resolve
in interface Resolver
rc
- The resolve context for the resolve operation. Must not be
null
.ResolutionException
- If the resolution cannot be satisfied.public Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> resolve(ResolveContext rc, org.osgi.resource.Resource host, org.osgi.resource.Requirement dynamicReq, List<org.osgi.resource.Capability> matches) throws ResolutionException
ResolveContext
. The dynamic requirement may contain
wild cards in its filter for the package name. The matching candidates
are used to resolve the requirement and the resolve context is not asked
to find providers for the dynamic requirement. The host resource is
expected to not be a fragment, to already be resolved and have an
existing wiring provided by the resolve context.
This operation may resolve additional resources in order to resolve the dynamic requirement. The returned map will contain entries for each resource that got resolved in addition to the specified host resource. The wire list for the host resource will only contain a single wire which is for the dynamic requirement.
rc
- the resolve contexthost
- the hosting resourcedynamicReq
- the dynamic requirementmatches
- a list of matching capabilitiesResolutionException
Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.