Class WagonTransporter

java.lang.Object
org.eclipse.aether.transport.wagon.WagonTransporter
All Implemented Interfaces:
Closeable, AutoCloseable, Transporter

final class WagonTransporter extends Object implements Transporter
A transporter using Maven Wagon.
  • Field Details

    • CONFIG_PROP_CONFIG

      private static final String CONFIG_PROP_CONFIG
      See Also:
    • CONFIG_PROP_FILE_MODE

      private static final String CONFIG_PROP_FILE_MODE
      See Also:
    • CONFIG_PROP_DIR_MODE

      private static final String CONFIG_PROP_DIR_MODE
      See Also:
    • CONFIG_PROP_GROUP

      private static final String CONFIG_PROP_GROUP
      See Also:
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • repository

      private final RemoteRepository repository
    • session

      private final RepositorySystemSession session
    • repoAuthContext

      private final AuthenticationContext repoAuthContext
    • proxyAuthContext

      private final AuthenticationContext proxyAuthContext
    • wagonProvider

      private final WagonProvider wagonProvider
    • wagonConfigurator

      private final WagonConfigurator wagonConfigurator
    • wagonHint

      private final String wagonHint
    • wagonRepo

      private final org.apache.maven.wagon.repository.Repository wagonRepo
    • wagonAuth

      private final org.apache.maven.wagon.authentication.AuthenticationInfo wagonAuth
    • wagonProxy

      private final org.apache.maven.wagon.proxy.ProxyInfoProvider wagonProxy
    • headers

      private final Properties headers
    • wagons

      private final Queue<org.apache.maven.wagon.Wagon> wagons
    • closed

      private final AtomicBoolean closed
  • Constructor Details

  • Method Details

    • getPermissions

      private static org.apache.maven.wagon.repository.RepositoryPermissions getPermissions(String repoId, RepositorySystemSession session)
    • getAuthenticationInfo

      private org.apache.maven.wagon.authentication.AuthenticationInfo getAuthenticationInfo(AuthenticationContext authContext)
    • getProxy

      private org.apache.maven.wagon.proxy.ProxyInfoProvider getProxy(RemoteRepository repository, AuthenticationContext authContext)
    • lookupWagon

      private org.apache.maven.wagon.Wagon lookupWagon() throws Exception
      Throws:
      Exception
    • releaseWagon

      private void releaseWagon(org.apache.maven.wagon.Wagon wagon)
    • connectWagon

      private void connectWagon(org.apache.maven.wagon.Wagon wagon) throws org.apache.maven.wagon.WagonException
      Throws:
      org.apache.maven.wagon.WagonException
    • disconnectWagon

      private void disconnectWagon(org.apache.maven.wagon.Wagon wagon)
    • pollWagon

      private org.apache.maven.wagon.Wagon pollWagon() throws Exception
      Throws:
      Exception
    • classify

      public int classify(Throwable error)
      Description copied from interface: Transporter
      Classifies the type of exception that has been thrown from a previous request to the transporter. The exception types employed by a transporter are generally unknown to its caller. Where a caller needs to distinguish between certain error cases, it employs this method to detect which error case corresponds to the exception.
      Specified by:
      classify in interface Transporter
      Parameters:
      error - The exception to classify, must not be null.
      Returns:
      The classification of the error, either Transporter.ERROR_NOT_FOUND or Transporter.ERROR_OTHER.
    • peek

      public void peek(PeekTask task) throws Exception
      Description copied from interface: Transporter
      Checks the existence of a resource in the repository. If the remote repository can be contacted successfully but indicates the resource specified in the request does not exist, an exception is thrown such that invoking Transporter.classify(Throwable) with that exception yields Transporter.ERROR_NOT_FOUND.
      Specified by:
      peek in interface Transporter
      Parameters:
      task - The existence check to perform, must not be null.
      Throws:
      Exception - If the existence of the specified resource could not be confirmed.
    • get

      public void get(GetTask task) throws Exception
      Description copied from interface: Transporter
      Downloads a resource from the repository. If the resource is downloaded to a file as given by GetTask.getDataFile() and the operation fails midway, the transporter should not delete the partial file but leave its management to the caller.
      Specified by:
      get in interface Transporter
      Parameters:
      task - The download to perform, must not be null.
      Throws:
      Exception - If the transfer failed.
    • put

      public void put(PutTask task) throws Exception
      Description copied from interface: Transporter
      Uploads a resource to the repository.
      Specified by:
      put in interface Transporter
      Parameters:
      task - The upload to perform, must not be null.
      Throws:
      Exception - If the transfer failed.
    • execute

      private void execute(TransportTask task, WagonTransporter.TaskRunner runner) throws Exception
      Throws:
      Exception
    • close

      public void close()
      Description copied from interface: Transporter
      Closes this transporter and frees any network resources associated with it. Once closed, a transporter must not be used for further transfers, any attempt to do so would yield a IllegalStateException or similar. Closing an already closed transporter is harmless and has no effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface Transporter