Class ConservativeAuthenticationSelector
- java.lang.Object
-
- org.eclipse.aether.util.repository.ConservativeAuthenticationSelector
-
- All Implemented Interfaces:
AuthenticationSelector
public final class ConservativeAuthenticationSelector extends Object implements AuthenticationSelector
An authentication selector that delegates to another selector but only if a repository has no authentication data yet. If authentication has already been assigned to a repository, that is selected.
-
-
Constructor Summary
Constructors Constructor Description ConservativeAuthenticationSelector(AuthenticationSelector selector)
Creates a new selector that delegates to the specified selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authentication
getAuthentication(RemoteRepository repository)
Selects authentication for the specified remote repository.
-
-
-
Constructor Detail
-
ConservativeAuthenticationSelector
public ConservativeAuthenticationSelector(AuthenticationSelector selector)
Creates a new selector that delegates to the specified selector.- Parameters:
selector
- The selector to delegate to in case a repository has no authentication yet, must not benull
.
-
-
Method Detail
-
getAuthentication
public Authentication getAuthentication(RemoteRepository repository)
Description copied from interface:AuthenticationSelector
Selects authentication for the specified remote repository.- Specified by:
getAuthentication
in interfaceAuthenticationSelector
- Parameters:
repository
- The repository for which to select authentication, must not benull
.- Returns:
- The selected authentication or
null
if none.
-
-