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
public abstract class MetadataTransfer extends Transfer
A download/upload of metadata.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.eclipse.aether.transfer.MetadataTransferExceptiongetException()Gets the exception that occurred during the transfer (if any).java.io.FilegetFile()Deprecated.UsegetPath()instead.org.eclipse.aether.metadata.MetadatagetMetadata()Gets the metadata being transferred.java.nio.file.PathgetPath()Gets the local file the metadata is downloaded to or uploaded from.MetadataTransfersetException(org.eclipse.aether.transfer.MetadataTransferException exception)Sets the exception that occurred during the transfer.MetadataTransfersetFile(java.io.File file)Deprecated.UsesetPath(Path)instead.MetadataTransfersetMetadata(org.eclipse.aether.metadata.Metadata metadata)Sets the metadata to transfer.MetadataTransfersetPath(java.nio.file.Path path)Sets the local file the metadata is downloaded to or uploaded from.-
Methods inherited from class org.eclipse.aether.spi.connector.Transfer
getListener, getTrace
-
-
-
-
Method Detail
-
getMetadata
public org.eclipse.aether.metadata.Metadata getMetadata()
Gets the metadata being transferred.- Returns:
- The metadata being transferred or
nullif not set.
-
setMetadata
public MetadataTransfer setMetadata(org.eclipse.aether.metadata.Metadata metadata)
Sets the metadata to transfer.- Parameters:
metadata- The metadata, may benull.- Returns:
- This transfer for chaining, never
null.
-
getFile
@Deprecated public java.io.File getFile()
Deprecated.UsegetPath()instead.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
nullif not set.
-
getPath
public java.nio.file.Path getPath()
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
nullif not set. - Since:
- 2.0.0
-
setFile
@Deprecated public MetadataTransfer setFile(java.io.File file)
Deprecated.UsesetPath(Path)instead.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.
-
setPath
public MetadataTransfer setPath(java.nio.file.Path path)
Sets the local file the metadata is downloaded to or uploaded from.- Parameters:
path- The local file, may benull.- Returns:
- This transfer for chaining, never
null. - Since:
- 2.0.0
-
getException
public org.eclipse.aether.transfer.MetadataTransferException getException()
Gets the exception that occurred during the transfer (if any).- Specified by:
getExceptionin classTransfer- Returns:
- The exception or
nullif the transfer was successful.
-
setException
public MetadataTransfer setException(org.eclipse.aether.transfer.MetadataTransferException exception)
Sets the exception that occurred during the transfer.- Parameters:
exception- The exception, may benullto denote a successful transfer.- Returns:
- This transfer for chaining, never
null.
-
-