public abstract class AbstractDownloadTask extends java.lang.Object implements DownloadTask
| Modifier and Type | Field and Description |
|---|---|
private boolean |
canceled |
private java.util.List<java.lang.Object> |
errorMessages |
private boolean |
failed |
| Constructor and Description |
|---|
AbstractDownloadTask() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
acceptsDocumentationSummary()
Returns a short HTML documentation string, describing acceptable URLs.
|
boolean |
acceptsUrl(java.lang.String url) |
boolean |
acceptsUrl(java.lang.String url,
boolean isRemotecontrol)
Returns true if the task is able to open the given URL, false otherwise.
|
java.util.List<java.lang.Object> |
getErrorObjects()
Replies the error objects of the task.
|
java.lang.String[] |
getPatterns()
Returns regular expressions that match the URLs
|
java.lang.String |
getTitle()
Returns human-readable description of the task
|
boolean |
isCanceled() |
boolean |
isFailed() |
boolean |
isSafeForRemotecontrolRequests()
Check / decide if the task is safe for remotecontrol.
|
protected void |
rememberErrorMessage(java.lang.String message) |
protected void |
rememberException(java.lang.Exception exception) |
void |
setCanceled(boolean canceled) |
void |
setFailed(boolean failed) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, download, getConfirmationMessage, loadUrlprivate java.util.List<java.lang.Object> errorMessages
private boolean canceled
private boolean failed
public AbstractDownloadTask()
public boolean isCanceled()
public void setCanceled(boolean canceled)
public boolean isFailed()
public void setFailed(boolean failed)
protected void rememberErrorMessage(java.lang.String message)
protected void rememberException(java.lang.Exception exception)
public java.util.List<java.lang.Object> getErrorObjects()
DownloadTaskStrings with error messages or Exceptions.getErrorObjects in interface DownloadTaskpublic java.lang.String acceptsDocumentationSummary()
DownloadTaskacceptsDocumentationSummary in interface DownloadTaskpublic boolean acceptsUrl(java.lang.String url)
public boolean isSafeForRemotecontrolRequests()
public boolean acceptsUrl(java.lang.String url, boolean isRemotecontrol)
DownloadTaskacceptsUrl in interface DownloadTaskurl - the url to download fromisRemotecontrol - True if download request comes from remotecontrol.public java.lang.String getTitle()
DownloadTaskgetTitle in interface DownloadTaskpublic java.lang.String[] getPatterns()
DownloadTaskgetPatterns in interface DownloadTask