public static FindLocationResultTO processFindLocation(JRSResponse responses) { long timeDelay = 0; ObjectMapper mapper = new ObjectMapper(); FindLocationResultTO resultTO = new FindLocationResultTO(); timeDelay += responses.getTimeDelay(); if (isSuccess(responses)) { resultTO.setSuccess(true); try { FindLocationResultTO findLoc = mapper.readValue(responses.getResponse(), FindLocationResultTO.class); resultTO.addLocationInfos(findLoc.getLocationInfos()); } catch (Exception e) { logger.error(e.getMessage(), e); } } resultTO.setSearchTime(timeDelay); return resultTO; }
public static void processPingTime(SlaveTO slaveTO, JRSResponse response) { if (isSuccess(response)) { slaveTO.updatePingTime((int) response.getTimeDelay()); } }