public class FetcherMgrImpl extends Object implements FetcherMgr
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
FetcherMgrImpl(RestfulMgr restfulMgr,
int retryTime,
int retrySleepSeconds,
boolean enableLocalDownloadDirInClassPath,
String localDownloadDir,
String localDownloadDirTemp,
List<String> hostList) |
| Modifier and Type | Method and Description |
|---|---|
String |
downloadFileFromServer(String url,
String fileName,
String targetFileDir)
下载配置文件, remoteUrl是 url
|
String |
getValueFromServer(String url)
根据 URL 从远程 获取Value值
|
void |
release()
释放资源
|
public FetcherMgrImpl(RestfulMgr restfulMgr, int retryTime, int retrySleepSeconds, boolean enableLocalDownloadDirInClassPath, String localDownloadDir, String localDownloadDirTemp, List<String> hostList)
public String getValueFromServer(String url) throws Exception
getValueFromServer in interface FetcherMgrExceptionpublic String downloadFileFromServer(String url, String fileName, String targetFileDir) throws Exception
downloadFileFromServer in interface FetcherMgrExceptionpublic void release()
FetcherMgrrelease in interface FetcherMgrCopyright © 2015–2016 Baidu. All rights reserved.