@Deprecated public abstract class BaseFetcher extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
_defaultMaxContentSize
Deprecated.
|
protected Map<String,Integer> |
_maxContentSizes
Deprecated.
|
protected Set<String> |
_validMimeTypes
Deprecated.
|
static int |
DEFAULT_MAX_CONTENT_SIZE
Deprecated.
|
Constructor and Description |
---|
BaseFetcher()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
abort()
Deprecated.
Terminate any async request being processed.
|
void |
addValidMimeType(String validMimeType)
Deprecated.
|
void |
addValidMimeTypes(Set<String> validMimeTypes)
Deprecated.
|
FetchedResult |
get(String url)
Deprecated.
|
abstract FetchedResult |
get(String url,
Payload payload)
Deprecated.
Get the content stored in the resource referenced by the 'url' parameter.
|
int |
getDefaultMaxContentSize()
Deprecated.
|
int |
getMaxContentSize(String mimeType)
Deprecated.
|
protected static String |
getMimeTypeFromContentType(String contentType)
Deprecated.
|
Set<String> |
getValidMimeTypes()
Deprecated.
|
void |
setDefaultMaxContentSize(int defaultMaxContentSize)
Deprecated.
|
void |
setMaxContentSize(String mimeType,
int maxContentSize)
Deprecated.
|
void |
setValidMimeTypes(Set<String> validMimeTypes)
Deprecated.
|
public static final int DEFAULT_MAX_CONTENT_SIZE
protected int _defaultMaxContentSize
public void setDefaultMaxContentSize(int defaultMaxContentSize)
public int getDefaultMaxContentSize()
public void setMaxContentSize(String mimeType, int maxContentSize)
public int getMaxContentSize(String mimeType)
public void addValidMimeType(String validMimeType)
public FetchedResult get(String url) throws BaseFetchException
BaseFetchException
protected static String getMimeTypeFromContentType(String contentType)
public abstract FetchedResult get(String url, Payload payload) throws BaseFetchException
url
- a string url for which to get contentpayload
- a populated Payload
FetchedResult
associated with the URLBaseFetchException
- if an error results from fetching the url.public abstract void abort()
Copyright © 2009–2016 Crawler-Commons. All rights reserved.