Package org.eclipse.aether.spi.connector
Class MetadataTransfer
java.lang.Object
org.eclipse.aether.spi.connector.Transfer
org.eclipse.aether.spi.connector.MetadataTransfer
- Direct Known Subclasses:
MetadataDownload
,MetadataUpload
A download/upload of metadata.
- Restriction:
- This class is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionGets the exception that occurred during the transfer (if any).getFile()
Gets the local file the metadata is downloaded to or uploaded from.Gets the metadata being transferred.setException
(MetadataTransferException exception) Sets the exception that occurred during the transfer.Sets the local file the metadata is downloaded to or uploaded from.setMetadata
(Metadata metadata) Sets the metadata to transfer.Methods inherited from class org.eclipse.aether.spi.connector.Transfer
getListener, getTrace
-
Method Details
-
getMetadata
Gets the metadata being transferred.- Returns:
- The metadata being transferred or
null
if not set.
-
setMetadata
Sets the metadata to transfer.- Parameters:
metadata
- The metadata, may benull
.- Returns:
- This transfer for chaining, never
null
.
-
getFile
Gets the local file the metadata is downloaded to or uploaded from. In case of a download, a connector should first transfer the bytes to a temporary file and only overwrite the target file once the entire download is completed such that an interrupted/failed download does not corrupt the current file contents.- Returns:
- The local file or
null
if not set.
-
setFile
Sets the local file the metadata is downloaded to or uploaded from.- Parameters:
file
- The local file, may benull
.- Returns:
- This transfer for chaining, never
null
.
-
getException
Gets the exception that occurred during the transfer (if any).- Specified by:
getException
in classTransfer
- Returns:
- The exception or
null
if the transfer was successful.
-
setException
Sets the exception that occurred during the transfer.- Parameters:
exception
- The exception, may benull
to denote a successful transfer.- Returns:
- This transfer for chaining, never
null
.
-