String password = collectVo.getPassword();
try{
- if((collectVo.getRead_timeout()).trim().length()>0)
- this.readTimeout = Integer.parseInt(collectVo.getRead_timeout());
+ if((collectVo.getReadTimeout()).trim().length()>0)
+ this.readTimeout = Integer.parseInt(collectVo.getReadTimeout());
} catch (NumberFormatException e) {
log.error("Unable to parse read_timout: ",e);
private String crontab;
- private String IP;
+ private String ip;
private String port;
private boolean iscollect = false;
- private String read_timeout;
+ private String readTimeout;
/**
* @return the iP
*/
public String getIP() {
- return IP;
+ return ip;
}
/**
* @param ip the iP to set
*/
- public void setIP(String ip) {
- IP = ip;
+ public void setIP(String inIP) {
+ ip = inIP;
}
/**
@Override
public String toString() {
return "CollectVo [emsName=" + emsName + ", type=" + type
- + ", crontab=" + crontab + ", IP=" + IP + ", port=" + port
+ + ", crontab=" + crontab + ", IP=" + ip + ", port=" + port
+ ", user=" + user + ", password=" + password + ", remotepath="
+ remotepath + ", match=" + match + ", passive=" + passive
+ ", ftptype=" + ftptype + ", granularity=" + granularity
- + ", iscollect=" + iscollect + ", read_timeout=" + read_timeout
+ + ", iscollect=" + iscollect + ", readTimeout=" + readTimeout
+ "]";
}
}
/**
- * @return the read_timeout
+ * @return the readTimeout
*/
- public String getRead_timeout() {
- return read_timeout;
+ public String getReadTimeout() {
+ return readTimeout;
}
/**
* @param read_timeout the read_timeout to set
*/
- public void setRead_timeout(String read_timeout) {
- this.read_timeout = read_timeout;
+ public void setReadTimeout(String inReadTimeout) {
+ this.readTimeout = inReadTimeout;
}
private boolean iscollect = false;
- private String read_timeout;
+ private String readTimeout;
/**
* @return the type
/**
* @return the read_timeout
*/
- public String getRead_timeout() {
- return read_timeout;
+ public String getReadTimeout() {
+ return readTimeout;
}
/**
* @param read_timeout the read_timeout to set
*/
- public void setRead_timeout(String read_timeout) {
- this.read_timeout = read_timeout;
+ public void setReadTimeout(String inReadTimeout) {
+ this.readTimeout = inReadTimeout;
}
@Override
public String toString() {
return "CrontabVo [type=" + type + ", crontab=" + crontab + ", match="
+ match + ", granularity=" + granularity + ", iscollect="
- + iscollect + ", read_timeout=" + read_timeout + "]";
+ + iscollect + ", read_timeout=" + readTimeout + "]";
}
private String name;
- private Map<String, CollectVo> collectMap = new HashMap<String, CollectVo>();
+ private Map<String, CollectVo> collectMap = new HashMap<>();
/**
* @return the name
}
public CollectVo getCollectVoByType(String type) {
- CollectVo collectVo = this.collectMap.get(type);
- return collectVo;
+ return this.collectMap.get(type);
}
public void putCollectMap(String type, CollectVo collectVo) {
continue;
}
- crontabVo.setRead_timeout(child.getChildText("readtimeout"));
+ crontabVo.setReadTimeout(child.getChildText("readtimeout"));
} else {
String crontab = child.getAttributeValue("crontab");
if (!StringUtil.isBank(type) && !StringUtil.isBank(crontab)) {
collectVo.setPort(collect.getString("port"));
collectVo.setUser(collect.getString("user-name"));
collectVo.setPassword(collect.getString("password"));
- collectVo.setRead_timeout(crontabVo.getRead_timeout());
+ collectVo.setReadTimeout(crontabVo.getReadTimeout());
} else {
log.error("emsCrontab.get(system_type) result crontabVo is null system_type=[" + system_type + "]");
}
crontabVo.setGranularity("crontab");
crontabVo.setIscollect(true);
crontabVo.setMatch("crontab");
- crontabVo.setRead_timeout("10000");
+ crontabVo.setReadTimeout("10000");
crontabVo.setType("qw");
assertNotNull(crontabVo.toString());
}
@Test
public void testEMSInfo() {
EMSInfo.setName("emsName");
- Map<String, CollectVo> collectMap = new HashMap<String, CollectVo>();
+ Map<String, CollectVo> collectMap = new HashMap<>();
CollectVo collectVo = new CollectVo();
collectVo.setEmsName("emsName");
collectMap.put("pm", collectVo);
collectVo.setPort(collect.getChildText("port"));
collectVo.setUser(collect.getChildText("user"));
collectVo.setPassword(collect.getChildText("password"));
- collectVo.setRead_timeout(collect.getChildText("readtimeout"));
+ collectVo.setReadTimeout(collect.getChildText("readtimeout"));
} else {
String crontab = collect.getAttributeValue("crontab");
if (!StringUtil.isBank(type) && !StringUtil.isBank(crontab)) {