public interface Environment
Resolver.resolve(Environment, Collection, Collection)
operation.
Environments:
capabilities
that the Resolver can use
to satisfy requirements
via the
findProviders(Requirement)
methodgetWirings()
method. This provides
a map to link existing resolved resources
to their wirings
.
isEffective(Requirement)
.
An environment may be used to provide capabilities via local resources
and/or remote repositories
.
A resolver may call the findProviders(Requirement)
,
isEffective(Requirement)
and getWirings()
method any number of
times during a resolve using any thread. Environments may also be shared
between several resolvers. As such implementors should ensure that this class
is properly synchronized.
Modifier and Type | Method and Description |
---|---|
SortedSet<Capability> |
findProviders(Requirement requirement)
Find any capabilities that
match
the supplied requirement. |
Map<Resource,Wiring> |
getWirings()
An immutable map of wirings for resources.
|
boolean |
isEffective(Requirement requirement)
Test if a given requirement should be wired in a given resolve
operation.
|
SortedSet<Capability> findProviders(Requirement requirement)
match
the supplied requirement.
A resolver should use the iteration order or the returned capability collection to infer preference in the case where multiple capabilities match a requirement. Capabilities at the start of the iteration are implied to be preferred over capabilities at the end.
requirement
- the requirement that a resolver is attempting to satisfyNullPointerException
- if the requirement is nullboolean isEffective(Requirement requirement)
The primary use case for this is to test the effective
directive
on the requirement, though implementations are free to use this for any other
purposes.
requirement
- the Requirement to testNullPointerException
- if requirement is nullCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.