Package com.google.walkaround.slob.server

Examples of com.google.walkaround.slob.server.SlobStore$ConnectResult


  }

  private void inner(HttpServletRequest req, HttpServletResponse resp)
      throws IOException, JSONException {
    JSONObject result = new JSONObject();
    SlobStore store = storeSelector.get(session.getStoreType()).getSlobStore();
    try {
      int revision = Integer.parseInt(requireParameter(req, Params.REVISION));
      ConnectResult r = store.reconnect(session.getObjectId(), session.getClientId());
      if (r.getChannelToken() != null) {
        result.put("token", r.getChannelToken());
        HistoryResult history = store.loadHistory(session.getObjectId(), revision, null);
        result.put("history", HistoryHandler.serializeHistory(revision, history.getData()));
        result.put("head", r.getVersion());
      } else {
        // TODO(ohler): Figure out and document how the client-server protocol
        // works and what the different endpoints do.  It's not clear to me why
View Full Code Here


    } catch (NumberFormatException nfe) {
      throw new BadRequestException(nfe);
    }

    SlobId objectId = session.getObjectId();
    SlobStore store = storeSelector.get(session.getStoreType()).getSlobStore();
    JSONObject result = new JSONObject();
    HistoryResult history = store.loadHistory(objectId, startVersion, endVersion);
    result.put("history", serializeHistory(startVersion, history.getData()));
    result.put("more", history.hasMore());

    resp.setContentType("application/json");
    ServletUtil.writeJsonResult(resp.getWriter(), result.toString());
View Full Code Here

TOP

Related Classes of com.google.walkaround.slob.server.SlobStore$ConnectResult

Copyright © 2018 www.massapicom. 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.