public interface ResolveContext
resolve
operation.
Resolve Contexts:
capabilities that the Resolver can use to
satisfy requirements via the
findProviders(Requirement) methodgetWirings() method. A wiring
consists of a map of existing resources to wiring.#isEffective(Requirement).A resolver may call the methods on the resolve context any number of times during a resolve operation using any thread. Implementors should ensure that this class is properly thread safe.
Except for #insertHostedCapability(List, HostedCapability), the
resolve context methods must be idempotent. This means that resources
must have constant capabilities and requirements and the resolve context must
return a consistent set of capabilities, wires and effective requirements.
| Modifier and Type | Method and Description |
|---|---|
List<Capability> |
findProviders(Requirement requirement)
Find Capabilities that match the given Requirement.
|
Collection<Resource> |
getMandatoryResources()
Return the resources that must be resolved for this resolve context.
|
Collection<Resource> |
getOptionalResources()
Return the resources that the resolver should attempt to resolve for this
resolve context.
|
Map<Resource,Wiring> |
getWirings()
Returns the wirings for existing resolved resources.
|
Collection<Resource> getMandatoryResources()
The default implementation returns an empty collection.
Collection<Resource> getOptionalResources()
The default implementation returns an empty collection.
List<Capability> findProviders(Requirement requirement)
The returned list contains Capability objects where the Resource
must be the declared Resource of the Capability.
The returned list is in priority order such that the Capabilities with a lower index have a preference over those with a higher index.
Each returned Capability must match the given Requirement.
requirement - The requirement that a resolver is attempting to
satisfy. Must not be null.Capability objects that match the specified
requirement.Copyright © 2013 JBoss by Red Hat. All Rights Reserved.