public class SimpleHttpFetcher extends BaseHttpFetcher
Modifier and Type | Class and Description |
---|---|
static class |
SimpleHttpFetcher.IdleConnectionMonitorThread |
static class |
SimpleHttpFetcher.MyConnectionKeepAliveStrategy |
BaseHttpFetcher.RedirectMode
_acceptLanguage, _maxConnectionsPerHost, _maxRedirects, _maxThreads, _minResponseRate, _redirectMode, _userAgent, DEFAULT_ACCEPT_LANGUAGE, DEFAULT_MAX_CONNECTIONS_PER_HOST, DEFAULT_MAX_REDIRECTS, DEFAULT_MIN_RESPONSE_RATE, DEFAULT_REDIRECT_MODE, NO_MIN_RESPONSE_RATE, NO_REDIRECTS
_defaultMaxContentSize, _maxContentSizes, _validMimeTypes, DEFAULT_MAX_CONTENT_SIZE
Constructor and Description |
---|
SimpleHttpFetcher(int maxThreads,
UserAgent userAgent) |
SimpleHttpFetcher(UserAgent userAgent) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Terminate any async request being processed.
|
FetchedResult |
fetch(org.apache.http.client.methods.HttpRequestBase request,
String url,
Payload payload) |
FetchedResult |
fetch(String url) |
protected void |
finalize() |
FetchedResult |
get(String url,
Payload payload)
Get the content stored in the resource referenced by
|
int |
getConnectionTimeout() |
org.apache.http.HttpVersion |
getHttpVersion() |
int |
getMaxRetryCount() |
int |
getSocketTimeout() |
void |
setConnectionTimeout(int connectionTimeoutInMs) |
void |
setHttpVersion(org.apache.http.HttpVersion httpVersion) |
void |
setMaxRetryCount(int maxRetryCount) |
void |
setSocketTimeout(int socketTimeoutInMs) |
getAcceptLanguage, getMaxConnectionsPerHost, getMaxRedirects, getMaxThreads, getMinResponseRate, getRedirectMode, getUserAgent, setAcceptLanguage, setMaxConnectionsPerHost, setMaxRedirects, setMinResponseRate, setRedirectMode
addValidMimeType, addValidMimeTypes, get, getDefaultMaxContentSize, getMaxContentSize, getMimeTypeFromContentType, getValidMimeTypes, setDefaultMaxContentSize, setMaxContentSize, setValidMimeTypes
public SimpleHttpFetcher(UserAgent userAgent)
public SimpleHttpFetcher(int maxThreads, UserAgent userAgent)
public org.apache.http.HttpVersion getHttpVersion()
public void setHttpVersion(org.apache.http.HttpVersion httpVersion)
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeoutInMs)
public int getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeoutInMs)
public int getMaxRetryCount()
public void setMaxRetryCount(int maxRetryCount)
public FetchedResult get(String url, Payload payload) throws BaseFetchException
BaseFetcher
get
in class BaseFetcher
BaseFetchException
public FetchedResult fetch(String url) throws BaseFetchException
BaseFetchException
public FetchedResult fetch(org.apache.http.client.methods.HttpRequestBase request, String url, Payload payload) throws BaseFetchException
BaseFetchException
public void abort()
BaseFetcher
abort
in class BaseFetcher
Copyright © 2015. All rights reserved.