@Service(value="downloadErrorPolicy#propagate-errors") public class PropagateErrorsDownloadPolicy extends Object implements DownloadErrorPolicy
| Modifier and Type | Field and Description |
|---|---|
static String |
IGNORE
Ignore errors and treat as if it were not found.
|
private org.slf4j.Logger |
log |
private List<String> |
options |
static String |
QUEUE
Propagate errors at the end after all are gathered, if there was no successful download from other proxies.
|
static String |
STOP
Signifies any error should stop searching for other proxies.
|
| Constructor and Description |
|---|
PropagateErrorsDownloadPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyPolicy(String policySetting,
Properties request,
File localFile,
Exception exception,
Map<String,Exception> previousExceptions)
Apply the download error policy.
|
String |
getDefaultOption()
Get the default option for this policy.
|
String |
getId()
Get the id for this policy.
|
String |
getName()
Get the display name for this policy.
|
List<String> |
getOptions()
Get the list of options for this policy.
|
private org.slf4j.Logger log
public static final String STOP
public static final String QUEUE
public static final String IGNORE
public PropagateErrorsDownloadPolicy()
public boolean applyPolicy(String policySetting, Properties request, File localFile, Exception exception, Map<String,Exception> previousExceptions) throws PolicyConfigurationException
DownloadErrorPolicyapplyPolicy in interface DownloadErrorPolicypolicySetting - the policy setting.request - the list of request properties that the policy might use.exception - the exception that triggered the errorpreviousExceptions - any previously triggered exceptionsPolicyConfigurationException - if the policy is improperly configuredpublic String getDefaultOption()
PolicygetDefaultOption in interface Policypublic String getName()
Policypublic List<String> getOptions()
PolicygetOptions in interface PolicyCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.