private void advanceTime() { List<String> timestamps = headers.getRequestHeader(Time.TIME_STAMP); if (timestamps.size() != 1) { throw new WebApplicationException(Response.Status.BAD_REQUEST); } Time.advanceTime(Long.parseLong(timestamps.get(0))); }
private Response response() { return Response.ok().header(Time.TIME_STAMP, Time.advanceTime()).build(); }
private Response responseNull() { return Response.notModified().header(Time.TIME_STAMP, Time.advanceTime()).build(); }
private Response response(TableRow r) { return Response.ok(tableRowRep(r)).header(Time.TIME_STAMP, Time.advanceTime()).build(); }
private Response response(String[] binds) { return Response.ok(stringArray(binds)).header(Time.TIME_STAMP, Time.advanceTime()).build(); }
private Response response(NodeInfo n) { return Response.ok(nodeInfoRep(n)).header(Time.TIME_STAMP, Time.advanceTime()).build(); }