public abstract class AbstractFetcher extends Object implements Fetcher
Modifier | Constructor and Description |
---|---|
protected |
AbstractFetcher(String archiveUrl,
String path)
Constructor depending on split URL parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
archiveUrl()
Access to the base-url of the archive.
|
boolean |
equals(Object o)
Jobs are equal if and only if
this.url.equals(job.url) |
protected InputStream |
getInputStream() |
int |
getStatusCode()
Access HTTP error code, e.g. 404 for not found.
|
int |
hashCode()
Obey equals contract.
|
String |
path() |
void |
setInputStream(InputStream is)
Used by HarvestRunner to set the data stream returned by the
request of the url.
|
void |
setStatusCode(int code)
Set HTTP status code, e.g. 404 for not found.
|
String |
url()
Base-url and path combined to complete url.
|
protected AbstractFetcher(String archiveUrl, String path)
archiveUrl
- url of this archive, uniquepath
- path and query of this archivepublic String archiveUrl()
archiveUrl
in interface Fetcher
public void setInputStream(InputStream is)
setInputStream
in interface Fetcher
protected InputStream getInputStream()
public void setStatusCode(int code)
setStatusCode
in interface Fetcher
code
- public int getStatusCode()