public abstract class AbstractDownloadTask extends Object implements DownloadTask
Modifier and Type | Field and Description |
---|---|
private boolean |
canceled |
private List<Object> |
errorMessages |
private boolean |
failed |
Constructor and Description |
---|
AbstractDownloadTask() |
Modifier and Type | Method and Description |
---|---|
String |
acceptsDocumentationSummary()
Returns a short HTML documentation string, describing acceptable URLs.
|
boolean |
acceptsUrl(String url)
Returns true if the task is able to open the given URL, false otherwise.
|
List<Object> |
getErrorObjects()
Replies the error objects of the task.
|
String[] |
getPatterns()
Returns regular expressions that match the URLs
|
String |
getTitle()
Returns human-readable description of the task
|
boolean |
isCanceled() |
boolean |
isFailed() |
protected void |
rememberErrorMessage(String message) |
protected void |
rememberException(Exception exception) |
void |
setCanceled(boolean canceled) |
void |
setFailed(boolean failed) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancel, download, getConfirmationMessage, loadUrl
private List<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(String message)
protected void rememberException(Exception exception)
public List<Object> getErrorObjects()
DownloadTask
String
s with error messages or Exception
s.getErrorObjects
in interface DownloadTask
public String acceptsDocumentationSummary()
DownloadTask
acceptsDocumentationSummary
in interface DownloadTask
public boolean acceptsUrl(String url)
DownloadTask
acceptsUrl
in interface DownloadTask
url
- the url to download frompublic String getTitle()
DownloadTask
getTitle
in interface DownloadTask
public String[] getPatterns()
DownloadTask
getPatterns
in interface DownloadTask