if (sample instanceof HTTPSampleResult) {
surl = ((HTTPSampleResult) sample).getURL();
// String rescontent = new String(sample.getResponseData());
if (sample.isResponseCodeOK() && ((HTTPSampleResult) sample).isMonitor()) {
ObjectFactory of = ObjectFactory.getInstance();
Status st = of.parseBytes(sample.getResponseData());
st.setConnectorPrefix(connectorPrefix);
if (surl != null) {// surl can be null if read from a file
MonitorStats stat = new MonitorStats(Stats.calculateStatus(st), Stats.calculateLoad(st), 0, Stats
.calculateMemoryLoad(st), Stats.calculateThreadLoad(st), surl.getHost(), String.valueOf(surl
.getPort()), surl.getProtocol(), System.currentTimeMillis());
MonitorModel mo = new MonitorModel(stat);