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)
ProxyProviderreturnProxy in interface ProxyProviderproxy - the proxy config contains host,port and identify infopage - the download resulttask - the download taskpublic Proxy getProxy(Task task)
ProxyProvidergetProxy in interface ProxyProvidertask - the download taskCopyright © 2017. All rights reserved.