@Component(role=RepositoryConnectorFactory.class, hint="async-http") public class AsyncRepositoryConnectorFactory extends Object implements RepositoryConnectorFactory, Service
Constructor and Description |
---|
AsyncRepositoryConnectorFactory() |
AsyncRepositoryConnectorFactory(Logger logger,
FileProcessor fileProcessor) |
Modifier and Type | Method and Description |
---|---|
int |
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.
|
RepositoryConnector |
newInstance(RepositorySystemSession session,
RemoteRepository repository)
Tries to create a repository connector for the specified remote repository.
|
AsyncRepositoryConnectorFactory |
setFileProcessor(FileProcessor fileProcessor)
Sets the file processor to use for this component.
|
AsyncRepositoryConnectorFactory |
setLogger(Logger logger)
Sets the logger to use for this component.
|
AsyncRepositoryConnectorFactory |
setPriority(int priority)
Sets the priority of this component.
|
public AsyncRepositoryConnectorFactory()
public AsyncRepositoryConnectorFactory(Logger logger, FileProcessor fileProcessor)
public void initService(ServiceLocator locator)
Service
initService
in interface Service
locator
- The service locator, must not be null
.public AsyncRepositoryConnectorFactory setLogger(Logger logger)
logger
- The logger to use, may be null
to disable logging.null
.public AsyncRepositoryConnectorFactory setFileProcessor(FileProcessor fileProcessor)
fileProcessor
- The file processor to use, must not be null
.null
.public int getPriority()
RepositoryConnectorFactory
getPriority
in interface RepositoryConnectorFactory
public AsyncRepositoryConnectorFactory setPriority(int priority)
priority
- The priority.null
.public RepositoryConnector newInstance(RepositorySystemSession session, RemoteRepository repository) throws NoRepositoryConnectorException
RepositoryConnectorFactory
RemoteRepository.getProtocol()
and RemoteRepository.getContentType()
to determine whether it can
handle a repository.newInstance
in interface RepositoryConnectorFactory
session
- The repository system session from which to configure the connector, must not be null
. In
particular, a connector must notify any RepositorySystemSession.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 be null
.null
.NoRepositoryConnectorException
- If the factory cannot create a connector for the specified remote
repository.Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.