public class PageFetcher extends Configurable
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.conn.PoolingHttpClientConnectionManager |
connectionManager |
protected IdleConnectionMonitorThread |
connectionMonitorThread |
protected org.apache.http.impl.client.CloseableHttpClient |
httpClient |
protected long |
lastFetchTime |
protected static org.slf4j.Logger |
logger |
protected Object |
mutex |
config| Constructor and Description |
|---|
PageFetcher(CrawlConfig config) |
| Modifier and Type | Method and Description |
|---|---|
PageFetchResult |
fetchPage(WebURL webUrl) |
protected org.apache.http.client.methods.HttpUriRequest |
newHttpUriRequest(String url)
Creates a new HttpUriRequest for the given url.
|
void |
shutDown() |
getConfigprotected static final org.slf4j.Logger logger
protected org.apache.http.impl.conn.PoolingHttpClientConnectionManager connectionManager
protected org.apache.http.impl.client.CloseableHttpClient httpClient
protected final Object mutex
protected long lastFetchTime
protected IdleConnectionMonitorThread connectionMonitorThread
public PageFetcher(CrawlConfig config)
public PageFetchResult fetchPage(WebURL webUrl) throws InterruptedException, IOException, PageBiggerThanMaxSizeException
public void shutDown()
protected org.apache.http.client.methods.HttpUriRequest newHttpUriRequest(String url)
url - the url to be fetchedCopyright © 2015. All rights reserved.