}
}
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final BoomerangData data = parse(toMap(req.getQueryString()));
if (data.validate()) { // no url
// convert to counters
final String name = new URL(data.getUrl()).getPath(); // skip query
if (data.getTDone() != null) {
addToCounter(BOOMERANG_PERCEIVED, name, data.getTDone());
}
if (data.getLatency() != null) {
addToCounter(BOOMERANG_LATENCY, name, data.getLatency());
}
if (data.getBandwidth() != null) {
addToCounter(BOOMERANG_BANDWITH, name, data.getBandwidth());
}
}
// answer
resp.setStatus(200);