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