@ThreadSafe public class HttpClientDownloader extends AbstractDownloader
Constructor and Description |
---|
HttpClientDownloader() |
Modifier and Type | Method and Description |
---|---|
Page |
download(Request request,
Task task)
Downloads web pages and store in Page object.
|
protected Page |
handleResponse(Request request,
String charset,
org.apache.http.HttpResponse httpResponse,
Task task) |
void |
setHttpUriRequestConverter(HttpUriRequestConverter httpUriRequestConverter) |
void |
setProxyProvider(ProxyProvider proxyProvider) |
void |
setThread(int thread)
Tell the downloader how many threads the spider used.
|
download, download, onError, onSuccess
public void setHttpUriRequestConverter(HttpUriRequestConverter httpUriRequestConverter)
public void setProxyProvider(ProxyProvider proxyProvider)
public Page download(Request request, Task task)
Downloader
request
- requesttask
- taskpublic void setThread(int thread)
Downloader
thread
- number of threadsprotected Page handleResponse(Request request, String charset, org.apache.http.HttpResponse httpResponse, Task task) throws IOException
IOException
Copyright © 2017. All rights reserved.