Exemple #1
0
 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)));
 }
Exemple #2
0
 private Response response() {
   return Response.ok().header(Time.TIME_STAMP, Time.advanceTime()).build();
 }
Exemple #3
0
 private Response responseNull() {
   return Response.notModified().header(Time.TIME_STAMP, Time.advanceTime()).build();
 }
Exemple #4
0
 private Response response(TableRow r) {
   return Response.ok(tableRowRep(r)).header(Time.TIME_STAMP, Time.advanceTime()).build();
 }
Exemple #5
0
 private Response response(String[] binds) {
   return Response.ok(stringArray(binds)).header(Time.TIME_STAMP, Time.advanceTime()).build();
 }
Exemple #6
0
 private Response response(NodeInfo n) {
   return Response.ok(nodeInfoRep(n)).header(Time.TIME_STAMP, Time.advanceTime()).build();
 }