日期:2014-05-20 浏览次数:20835 次
[{"name":"rpd","id":255,"type":"MONITOR","available":true,"unitId":1,"ip":"99.7.7.243"},{"name":"jiankong","id":1873,"type":"MONITOR","available":true,"unitId":1,"ip":"99.7.7.233"},{"name":"monitor rpd","id":259,"type":"MONITOR","available":true,"unitId":1,"ip":"99.7.7.241"},{"name":"总行1604V","id":174,"type":"HDX","available":true,"unitId":1,"ip":"99.7.7.134"},{"name":"总行1603V","id":2270,"type":"HDX","available":true,"unitId":1,"ip":"99.7.7.133"},{"name":"总行1602V","id":2268,"type":"HDX","available":true,"unitId":1,"ip":"99.7.7.132"},{"name":"研发六楼603","id":2187,"type":"HDX","available":true,"unitId":1,"ip":"99.1.113.61"},{"name":"上海金融","id":2189,"type":"HDX","available":true,"unitId":1,"ip":"99.14.64.231"}]
public class EndpointInfo {
long id;
String type;
String name;
String ip;
boolean available;
long unitId;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getUnitId() {
return unitId;
}
public void setUnitId(long unitId) {
this.unitId = unitId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public boolean getAvailable() {
return available;
}
public void setAvailable(boolean available) {
this.available = available;
}
}
private static ArrayList<EndpointInfo> m_endpointinfolist = null;
Type typeoft = new TypeToken<ArrayList<EndpointInfo>>(){}.getType();
m_endpointinfolist = gson.fromJson(sb.toString(),typeoft);
private static final ObjectMapper mapper = new ObjectMapper();
private static ArrayList<EndpointInfo> m_endpointinfolist = null;
private static ArrayList<EndpointInfo> m_endpointinfolist = null;
m_endpointinfolist = mapper.readValue(sb.toString(), new TypeReference<ArrayList<EndpointInfo>>(){});