Class DefaultMirrorSelector
java.lang.Object
org.eclipse.aether.util.repository.DefaultMirrorSelector
- All Implemented Interfaces:
MirrorSelector
A simple mirror selector that selects mirrors based on repository identifiers.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultMirrorSelector
public DefaultMirrorSelector()
-
-
Method Details
-
add
public DefaultMirrorSelector add(String id, String url, String type, boolean repositoryManager, boolean blocked, String mirrorOfIds, String mirrorOfTypes) Adds the specified mirror to this selector.- Parameters:
id
- the identifier of the mirror, must not benull
url
- the URL of the mirror, must not benull
type
- the content type of the mirror, must not benull
repositoryManager
- a flag whether the mirror is a repository manager or a simple serverblocked
- a flag whether the mirror is blocked from performing any download requestsmirrorOfIds
- the identifier(s) of remote repositories to mirror, must not benull
. Multiple identifiers can be separated by comma and additionally the wildcards "*", "external:http:*" and "external:*" can be used to match all (external) repositories, prefixing a repo id with an exclamation mark allows to express an exclusion. For example "external:*,!central".mirrorOfTypes
- the content type(s) of remote repositories to mirror, may benull
or empty to match any content type. Similar to the repo id specification, multiple types can be comma-separated, the wildcard "*" and the "!" negation syntax are supported. For example "*,!p2".- Returns:
- this selector for chaining, never
null
-
getMirror
Description copied from interface:MirrorSelector
Selects a mirror for the specified repository.- Specified by:
getMirror
in interfaceMirrorSelector
- Parameters:
repository
- The repository to select a mirror for, must not benull
.- Returns:
- The selected mirror or
null
if none. - See Also:
-