Class BasicRepositoryConnectorFactory
java.lang.Object
org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory
- All Implemented Interfaces:
RepositoryConnectorFactory
@Named("basic")
public final class BasicRepositoryConnectorFactory
extends Object
implements RepositoryConnectorFactory
A repository connector factory that employs pluggable
transporters
and
repository layouts
for the transfers.-
Field Summary
-
Constructor Summary
ConstructorDescriptionBasicRepositoryConnectorFactory
(TransporterProvider transporterProvider, RepositoryLayoutProvider layoutProvider, ChecksumPolicyProvider checksumPolicyProvider, ChecksumProcessor checksumProcessor, Map<String, ProvidedChecksumsSource> providedChecksumsSources) -
Method Summary
Modifier and TypeMethodDescriptionfloat
The priority of this factory.newInstance
(RepositorySystemSession session, RemoteRepository repository) Tries to create a repository connector for the specified remote repository.setPriority
(float priority) Sets the priority of this component.
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
BasicRepositoryConnectorFactory
@Inject public BasicRepositoryConnectorFactory(TransporterProvider transporterProvider, RepositoryLayoutProvider layoutProvider, ChecksumPolicyProvider checksumPolicyProvider, ChecksumProcessor checksumProcessor, Map<String, ProvidedChecksumsSource> providedChecksumsSources)
-
-
Method Details
-
getPriority
Description copied from interface:RepositoryConnectorFactory
The priority of this factory. When multiple factories can handle a given repository, factories with higher priority are preferred over those with lower priority.- Specified by:
getPriority
in interfaceRepositoryConnectorFactory
- Returns:
- The priority of this factory.
-
setPriority
Sets the priority of this component.- Parameters:
priority
- The priority.- Returns:
- This component for chaining, never
null
.
-
newInstance
public RepositoryConnector newInstance(RepositorySystemSession session, RemoteRepository repository) throws NoRepositoryConnectorException Description copied from interface:RepositoryConnectorFactory
Tries to create a repository connector for the specified remote repository. Typically, a factory will inspectRemoteRepository.getProtocol()
andRemoteRepository.getContentType()
to determine whether it can handle a repository.- Specified by:
newInstance
in interfaceRepositoryConnectorFactory
- Parameters:
session
- The repository system session from which to configure the connector, must not benull
. In particular, a connector must notify anyRepositorySystemSession.getTransferListener()
set for the session and should obey the timeouts configured for the session.repository
- The remote repository to create a connector for, must not benull
.- Returns:
- The connector for the given repository, never
null
. - Throws:
NoRepositoryConnectorException
- If the factory cannot create a connector for the specified remote repository.
-