Package org.eclipse.aether.internal.impl
Class DefaultTransporterProvider
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultTransporterProvider
-
- All Implemented Interfaces:
TransporterProvider,Service
@Named public final class DefaultTransporterProvider extends java.lang.Object implements TransporterProvider, Service
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<TransporterFactory>factoriesprivate static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description DefaultTransporterProvider()DefaultTransporterProvider(java.util.Set<TransporterFactory> transporterFactories)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultTransporterProvideraddTransporterFactory(TransporterFactory factory)voidinitService(ServiceLocator locator)Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.TransporternewTransporter(RepositorySystemSession session, RemoteRepository repository)Tries to create a transporter for the specified remote repository.DefaultTransporterProvidersetTransporterFactories(java.util.Collection<TransporterFactory> factories)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
factories
private java.util.Collection<TransporterFactory> factories
-
-
Constructor Detail
-
DefaultTransporterProvider
public DefaultTransporterProvider()
-
DefaultTransporterProvider
@Inject DefaultTransporterProvider(java.util.Set<TransporterFactory> transporterFactories)
-
-
Method Detail
-
initService
public void initService(ServiceLocator locator)
Description copied from interface:ServiceProvides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.- Specified by:
initServicein interfaceService- Parameters:
locator- The service locator, must not benull.
-
addTransporterFactory
public DefaultTransporterProvider addTransporterFactory(TransporterFactory factory)
-
setTransporterFactories
public DefaultTransporterProvider setTransporterFactories(java.util.Collection<TransporterFactory> factories)
-
newTransporter
public Transporter newTransporter(RepositorySystemSession session, RemoteRepository repository) throws NoTransporterException
Description copied from interface:TransporterProviderTries to create a transporter for the specified remote repository.- Specified by:
newTransporterin interfaceTransporterProvider- Parameters:
session- The repository system session from which to configure the transporter, must not benull.repository- The remote repository to create a transporter for, must not benull.- Returns:
- The transporter for the given repository, never
null. - Throws:
NoTransporterException- If none of the installed transporter factories can provide a transporter for the specified remote repository.
-
-