Interface TransporterFactory

All Known Subinterfaces:

public interface TransporterFactory
A factory to create transporters. A transporter is responsible for uploads/downloads to/from a remote repository using a particular transport protocol. When the repository system needs a transporter 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 transporter returned by a factory will then be used for the transfer.
  • Method Summary

    Modifier and Type
    The priority of this factory.
    newInstance(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository)
    Tries to create a transporter for the specified remote repository.
  • Method Details

    • newInstance

      Transporter newInstance(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository) throws org.eclipse.aether.transfer.NoTransporterException
      Tries to create a transporter for the specified remote repository. Typically, a factory will inspect RemoteRepository.getProtocol() to determine whether it can handle a repository.
      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.
      The transporter for the given repository, never null.
      org.eclipse.aether.transfer.NoTransporterException - If the factory cannot create a transporter 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.
      The priority of this factory.