Interface TransporterFactory


  • 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      float getPriority()
      The priority of this factory.
      Transporter newInstance​(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository)
      Tries to create a transporter for the specified remote repository.
    • Method Detail

      • 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.
        Parameters:
        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.
        Returns:
        The transporter for the given repository, never null.
        Throws:
        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.
        Returns:
        The priority of this factory.