Package org.eclipse.aether.spi.connector
Interface RepositoryConnector
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
BasicRepositoryConnector
public interface RepositoryConnector extends java.io.CloseableA connector for a remote repository. The connector is responsible for downloading/uploading of artifacts and metadata from/to a remote repository.If applicable, a connector should obey connect/request timeouts and other relevant settings from the
configuration propertiesof the repository session it has been obtained for. However, a connector must not emit any events to the transfer listener configured for the session. Instead, transfer events must be emitted only to the listener (if any) specified for a given download/upload request.Note: While a connector itself can use multiple threads internally to performs the transfers, clients must not call a connector concurrently, i.e. connectors are generally not thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this connector and frees any network resources associated with it.voidget(java.util.Collection<? extends ArtifactDownload> artifactDownloads, java.util.Collection<? extends MetadataDownload> metadataDownloads)Performs the specified downloads.voidput(java.util.Collection<? extends ArtifactUpload> artifactUploads, java.util.Collection<? extends MetadataUpload> metadataUploads)Performs the specified uploads.
-
-
-
Method Detail
-
get
void get(java.util.Collection<? extends ArtifactDownload> artifactDownloads, java.util.Collection<? extends MetadataDownload> metadataDownloads)
Performs the specified downloads. If a download fails, the connector stores the underlying exception in the download object such that callers can inspect the result viaArtifactTransfer.getException()andMetadataTransfer.getException(), respectively. If reasonable, a connector should continue to process the remaining downloads after an error to retrieve as many items as possible. The connector may perform the transfers concurrently and in any order.- Parameters:
artifactDownloads- The artifact downloads to perform, may benullor empty.metadataDownloads- The metadata downloads to perform, may benullor empty.
-
put
void put(java.util.Collection<? extends ArtifactUpload> artifactUploads, java.util.Collection<? extends MetadataUpload> metadataUploads)
Performs the specified uploads. If an upload fails, the connector stores the underlying exception in the upload object such that callers can inspect the result viaArtifactTransfer.getException()andMetadataTransfer.getException(), respectively. The connector may perform the transfers concurrently and in any order.- Parameters:
artifactUploads- The artifact uploads to perform, may benullor empty.metadataUploads- The metadata uploads to perform, may benullor empty.
-
close
void close()
Closes this connector and frees any network resources associated with it. Once closed, a connector must not be used for further transfers, any attempt to do so would yield aIllegalStateExceptionor similar. Closing an already closed connector is harmless and has no effect.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-