public class SimpleProxyProvider extends Object implements ProxyProvider
Constructor and Description |
---|
SimpleProxyProvider(List<Proxy> proxies) |
Modifier and Type | Method and Description |
---|---|
static SimpleProxyProvider |
from(Proxy... proxies) |
Proxy |
getProxy(Task task)
Get a proxy for task by some strategy.
|
void |
returnProxy(Proxy proxy,
Page page,
Task task)
Return proxy to Provider when complete a download.
|
public static SimpleProxyProvider from(Proxy... proxies)
public void returnProxy(Proxy proxy, Page page, Task task)
ProxyProvider
returnProxy
in interface ProxyProvider
proxy
- the proxy config contains host,port and identify infopage
- the download resulttask
- the download taskpublic Proxy getProxy(Task task)
ProxyProvider
getProxy
in interface ProxyProvider
task
- the download taskCopyright © 2017. All rights reserved.