Examples of cacheControl()


Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

              value.getValue()));
        value = generator.next();
      } while (value != null);
      model.addRow(rowModel);
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
    }
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

      if (!generator.hasNext()) {
        throw new WebApplicationException(Response.Status.NOT_FOUND);
      }
      KeyValue value = generator.next();
      ResponseBuilder response = Response.ok(value.getValue());
      response.cacheControl(cacheControl);
      response.header("X-Timestamp", value.getTimestamp());
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

          Bytes.toString(e.getValue().get()));
      }
        model.addColumnFamily(columnModel);
      }
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (TableNotFoundException e) {
      throw new WebApplicationException(Response.Status.NOT_FOUND);
    } catch (IOException e) {
      throw new WebApplicationException(e,
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

      HBaseConfiguration hconf = server.getConfiguration();
      HBaseAdmin admin = new HBaseAdmin(hconf);
      StorageClusterVersionModel model = new StorageClusterVersionModel();
      model.setVersion(admin.getClusterStatus().getHBaseVersion());
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
    }
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

          continue;
        }
        tableList.add(new TableModel(htd.getNameAsString()));
      }
      ResponseBuilder response = Response.ok(tableList);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
    }
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

          new TableRegionModel(table, hri.getRegionId(), hri.getStartKey(),
                hri.getEndKey(),
                sa.getHostName() + ":" + Integer.valueOf(sa.getPort())));
      }
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (TableNotFoundException e) {
      throw new WebApplicationException(Response.Status.NOT_FOUND);
    } catch (IOException e) {
      throw new WebApplicationException(e,
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

        new CellModel(value.getColumn(), value.getTimestamp(),
              value.getValue()));
    } while (--count > 0);
    model.addRow(rowModel);
    ResponseBuilder response = Response.ok(model);
    response.cacheControl(cacheControl);
    return response.build();
  }

  @GET
  @Produces(MIMETYPE_BINARY)
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

      if (value == null) {
        LOG.info("generator exhausted");
        return Response.noContent().build();
      }
      ResponseBuilder response = Response.ok(value.getValue());
      response.cacheControl(cacheControl);
      response.header("X-Row", Base64.encode(value.getRow()));
      response.header("X-Column", Base64.encode(value.getColumn()));
      response.header("X-Timestamp", value.getTimestamp());
      return response.build();
    } catch (IllegalStateException e) {
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

              value.getValue()));
        value = generator.next();
      } while (value != null);
      model.addRow(rowModel);
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
    }
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.cacheControl()

      if (!generator.hasNext()) {
        throw new WebApplicationException(Response.Status.NOT_FOUND);
      }
      KeyValue value = generator.next();
      ResponseBuilder response = Response.ok(value.getValue());
      response.cacheControl(cacheControl);
      response.header("X-Timestamp", value.getTimestamp());
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.