@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, setPolicyPrefix
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getName, getName, getOptionDescription, getOptionName
public 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
DownloadErrorPolicy
applyPolicy
in interface DownloadErrorPolicy
policySetting
- 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()
Policy
getDefaultOption
in interface Policy
public List<PolicyOption> getOptions()
Policy
getOptions
in interface Policy
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.