@Service(value="downloadErrorPolicy#propagate-errors") public class PropagateErrorsDownloadPolicy extends AbstractPolicy implements DownloadErrorPolicy
| Modifier and Type | Field and Description |
|---|---|
static DownloadErrorOption |
IGNORE
Ignore errors and treat as if it were not found.
|
static DownloadErrorOption |
QUEUE
Propagate errors at the end after all are gathered, if there was no successful download from other proxies.
|
static DownloadErrorOption |
STOP
Signifies any error should stop searching for other proxies.
|
RESOURCE_BUNDLE| Constructor and Description |
|---|
PropagateErrorsDownloadPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyPolicy(PolicyOption policySetting,
Properties request,
StorageAsset localFile,
Exception exception,
Map<String,Exception> previousExceptions)
Apply the download error policy.
|
PolicyOption |
getDefaultOption()
Get the default option for this policy.
|
String |
getId()
Get the id for this policy.
|
List<PolicyOption> |
getOptions()
Get the list of options for this policy.
|
getDescription, getName, getName, getOptionDescription, getOptionName, getOptionPrefix, getPolicyPrefix, setOptionPrefix, setPolicyPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getName, getName, getOptionDescription, getOptionNamepublic static final DownloadErrorOption STOP
public static final DownloadErrorOption QUEUE
public static final DownloadErrorOption IGNORE
public PropagateErrorsDownloadPolicy()
public boolean applyPolicy(PolicyOption policySetting, Properties request, StorageAsset 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 PolicyOption getDefaultOption()
PolicygetDefaultOption in interface Policypublic List<PolicyOption> getOptions()
PolicygetOptions in interface PolicyCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.