|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Environment
An environment provides options and constraints to the potential solution of
a 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.
| Method Summary | |
|---|---|
java.util.SortedSet<Capability> |
findProviders(Requirement requirement)
Find any capabilities that match
the supplied requirement. |
java.util.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. |
| Method Detail |
|---|
java.util.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 satisfy
java.lang.NullPointerException - 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 test
java.lang.NullPointerException - if requirement is nulljava.util.Map<Resource,Wiring> getWirings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||