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