@Named(value="wagon") public final class WagonTransporterFactory extends java.lang.Object implements TransporterFactory, Service
WagonProvider
.Modifier and Type | Field and Description |
---|---|
private Logger |
logger |
private float |
priority |
private WagonConfigurator |
wagonConfigurator |
private WagonProvider |
wagonProvider |
Constructor and Description |
---|
WagonTransporterFactory()
Creates an (uninitialized) instance of this transporter factory.
|
WagonTransporterFactory(WagonProvider wagonProvider,
WagonConfigurator wagonConfigurator,
LoggerFactory loggerFactory) |
Modifier and Type | Method and Description |
---|---|
float |
getPriority()
The priority of this factory.
|
void |
initService(ServiceLocator locator)
Provides the opportunity to initialize this service and to acquire other services for its operation from the
locator.
|
Transporter |
newInstance(RepositorySystemSession session,
RemoteRepository repository)
Tries to create a transporter for the specified remote repository.
|
WagonTransporterFactory |
setLoggerFactory(LoggerFactory loggerFactory)
Sets the logger factory to use for this component.
|
WagonTransporterFactory |
setPriority(float priority)
Sets the priority of this component.
|
WagonTransporterFactory |
setWagonConfigurator(WagonConfigurator wagonConfigurator)
Sets the wagon configurator to use to apply provider-specific configuration to wagon instances.
|
WagonTransporterFactory |
setWagonProvider(WagonProvider wagonProvider)
Sets the wagon provider to use to acquire and release wagon instances.
|
private Logger logger
private WagonProvider wagonProvider
private WagonConfigurator wagonConfigurator
private float priority
public WagonTransporterFactory()
@Inject WagonTransporterFactory(WagonProvider wagonProvider, WagonConfigurator wagonConfigurator, LoggerFactory loggerFactory)
public void initService(ServiceLocator locator)
Service
initService
in interface Service
locator
- The service locator, must not be null
.public WagonTransporterFactory setLoggerFactory(LoggerFactory loggerFactory)
loggerFactory
- The logger factory to use, may be null
to disable logging.null
.public WagonTransporterFactory setWagonProvider(WagonProvider wagonProvider)
wagonProvider
- The wagon provider to use, may be null
.null
.public WagonTransporterFactory setWagonConfigurator(WagonConfigurator wagonConfigurator)
wagonConfigurator
- The wagon configurator to use, may be null
.null
.public float getPriority()
TransporterFactory
getPriority
in interface TransporterFactory
public WagonTransporterFactory setPriority(float priority)
priority
- The priority.null
.public Transporter newInstance(RepositorySystemSession session, RemoteRepository repository) throws NoTransporterException
TransporterFactory
RemoteRepository.getProtocol()
to determine whether it can handle a repository.newInstance
in interface TransporterFactory
session
- The repository system session from which to configure the transporter, must not be null
.
In particular, a transporter should obey the timeouts configured for the session.repository
- The remote repository to create a transporter for, must not be null
.null
.NoTransporterException
- If the factory cannot create a transporter for the specified remote repository.