public class ChecksumFailureException extends RepositoryException
Constructor and Description |
---|
ChecksumFailureException(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 actual)
Deprecated.
Does not reveal expected checksum kind, use other constructor that provide that information as well.
|
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.
|
ChecksumFailureException(Throwable cause)
Creates a new exception with the specified cause.
|
Modifier and Type | Method and Description |
---|---|
String |
getActual()
Gets the actual checksum for the downloaded artifact/metadata.
|
String |
getExpected()
Gets the expected checksum for the downloaded artifact/metadata.
|
String |
getExpectedKind()
Gets the expected checksum kind for the downloaded artifact/metadata.
|
boolean |
isRetryWorthy()
Indicates whether the corresponding download is retry-worthy.
|
getMessage
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
@Deprecated public ChecksumFailureException(String expected, String actual)
retry-worthy
.expected
- The expected checksum as declared by the hosting repository, may be null
.actual
- The actual checksum as computed from the local bytes, may be null
.public ChecksumFailureException(String expected, String expectedKind, String actual)
retry-worthy
.expected
- The expected checksum as declared by the hosting repository, may be null
.expectedKind
- The expected checksum kind, may be null
.actual
- The actual checksum as computed from the local bytes, may be null
.public ChecksumFailureException(String message)
retry-worthy
.message
- The detail message, may be null
.public ChecksumFailureException(Throwable cause)
retry-worthy
.cause
- The exception that caused this one, may be null
.public ChecksumFailureException(String message, Throwable cause)
retry-worthy
.message
- The detail message, may be null
.cause
- The exception that caused this one, may be null
.public ChecksumFailureException(boolean retryWorthy, String message, Throwable cause)
retryWorthy
- true
if the exception is retry-worthy, false
otherwise.message
- The detail message, may be null
.cause
- The exception that caused this one, may be null
.public String getExpected()
null
if unknown.public String getExpectedKind()
null
if unknown.public String getActual()
null
if unknown.public boolean isRetryWorthy()
true
if retrying the download might solve the checksum failure, false
if the checksum
failure is non-recoverable.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.