Package org.eclipse.aether.transfer
Class ChecksumFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.aether.RepositoryException
org.eclipse.aether.transfer.ChecksumFailureException
- All Implemented Interfaces:
Serializable
Thrown in case of a checksum failure during an artifact/metadata download.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChecksumFailureException(boolean retryWorthy, String message, Throwable cause) Creates a new exception with the specified retry flag, detail message and cause.ChecksumFailureException(String message) Creates a new exception with the specified detail message.ChecksumFailureException(String expected, String expectedKind, String actual) Creates a new exception with the specified expected, expected kind and actual checksum.ChecksumFailureException(String message, Throwable cause) Creates a new exception with the specified detail message and cause.Creates a new exception with the specified cause. -
Method Summary
Modifier and TypeMethodDescriptionGets the actual checksum for the downloaded artifact/metadata.Gets the expected checksum for the downloaded artifact/metadata.Gets the expected checksum kind for the downloaded artifact/metadata.booleanIndicates whether the corresponding download is retry-worthy.Methods inherited from class org.eclipse.aether.RepositoryException
getMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ChecksumFailureException
Creates a new exception with the specified expected, expected kind and actual checksum. The resulting exception isretry-worthy.- Parameters:
expected- The expected checksum as declared by the hosting repository, may benull.expectedKind- The expected checksum kind, may benull.actual- The actual checksum as computed from the local bytes, may benull.- Since:
- 1.8.0
-
ChecksumFailureException
Creates a new exception with the specified detail message. The resulting exception is notretry-worthy.- Parameters:
message- The detail message, may benull.
-
ChecksumFailureException
Creates a new exception with the specified cause. The resulting exception is notretry-worthy.- Parameters:
cause- The exception that caused this one, may benull.
-
ChecksumFailureException
Creates a new exception with the specified detail message and cause. The resulting exception is notretry-worthy.- Parameters:
message- The detail message, may benull.cause- The exception that caused this one, may benull.
-
ChecksumFailureException
Creates a new exception with the specified retry flag, detail message and cause.- Parameters:
retryWorthy-trueif the exception is retry-worthy,falseotherwise.message- The detail message, may benull.cause- The exception that caused this one, may benull.
-
-
Method Details
-
getExpected
Gets the expected checksum for the downloaded artifact/metadata.- Returns:
- The expected checksum as declared by the hosting repository or
nullif unknown.
-
getExpectedKind
Gets the expected checksum kind for the downloaded artifact/metadata.- Returns:
- The expected checksum kind or
nullif unknown. - Since:
- 1.8.0
-
getActual
Gets the actual checksum for the downloaded artifact/metadata.- Returns:
- The actual checksum as computed from the local bytes or
nullif unknown.
-
isRetryWorthy
Indicates whether the corresponding download is retry-worthy.- Returns:
trueif retrying the download might solve the checksum failure,falseif the checksum failure is non-recoverable.
-