Class OfflineRepositoryConnector
java.lang.Object
org.eclipse.aether.internal.impl.offline.OfflineRepositoryConnector
- All Implemented Interfaces:
Closeable,AutoCloseable,RepositoryConnector
Offline connector, that prevents ANY remote access in case session is offline.
- Since:
- 2.0.8
-
Constructor Summary
ConstructorsConstructorDescriptionOfflineRepositoryConnector(RepositorySystemSession session, RemoteRepository remoteRepository, OfflineController offlineController, RepositoryConnector delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this connector and frees any network resources associated with it.voidget(Collection<? extends ArtifactDownload> artifactDownloads, Collection<? extends MetadataDownload> metadataDownloads) Performs the specified downloads.voidput(Collection<? extends ArtifactUpload> artifactUploads, Collection<? extends MetadataUpload> metadataUploads) Performs the specified uploads.toString()
-
Constructor Details
-
OfflineRepositoryConnector
public OfflineRepositoryConnector(RepositorySystemSession session, RemoteRepository remoteRepository, OfflineController offlineController, RepositoryConnector delegate)
-
-
Method Details
-
close
Description copied from interface:RepositoryConnectorCloses 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 interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceRepositoryConnector
-
get
public void get(Collection<? extends ArtifactDownload> artifactDownloads, Collection<? extends MetadataDownload> metadataDownloads) Description copied from interface:RepositoryConnectorPerforms 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.- Specified by:
getin interfaceRepositoryConnector- Parameters:
artifactDownloads- The artifact downloads to perform, may benullor empty.metadataDownloads- The metadata downloads to perform, may benullor empty.
-
put
public void put(Collection<? extends ArtifactUpload> artifactUploads, Collection<? extends MetadataUpload> metadataUploads) Description copied from interface:RepositoryConnectorPerforms 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.- Specified by:
putin interfaceRepositoryConnector- Parameters:
artifactUploads- The artifact uploads to perform, may benullor empty.metadataUploads- The metadata uploads to perform, may benullor empty.
-
toString
-