Package org.eclipse.aether.spi.connector
Interface RepositoryConnectorFactory
public interface RepositoryConnectorFactory
A factory to create repository connectors. A repository connector is responsible for uploads/downloads to/from a
certain kind of remote repository. When the repository system needs a repository connector for a given remote
repository, it iterates the registered factories in descending order of their priority and calls
newInstance(RepositorySystemSession, RemoteRepository)
on them. The first connector returned by a factory
will then be used for the transfer.-
Method Summary
Modifier and TypeMethodDescriptionfloat
The priority of this factory.newInstance
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository) Tries to create a repository connector for the specified remote repository.
-
Method Details
-
newInstance
RepositoryConnector newInstance(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository) throws org.eclipse.aether.transfer.NoRepositoryConnectorException 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.- 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:
org.eclipse.aether.transfer.NoRepositoryConnectorException
- If the factory cannot create a connector for the specified remote repository.
-
getPriority
float getPriority()The priority of this factory. When multiple factories can handle a given repository, factories with higher priority are preferred over those with lower priority.- Returns:
- The priority of this factory.
-