public TableListModel getTableList() throws IOException {

    StringBuilder path = new StringBuilder();
    path.append(pathPrefix);
    if (accessToken != null) {
      path.append(accessToken);
      path.append('/');
    }

    int code = 0;
    for (int i = 0; i < maxRetries; i++) {
      // Response response = client.get(path.toString(),
      // Constants.MIMETYPE_XML);
      Response response = client.get(path.toString(), Constants.MIMETYPE_PROTOBUF);
      code = response.getCode();
      switch (code) {
        case 200:
          TableListModel t = new TableListModel();
          return (TableListModel) t.getObjectFromMessage(response.getBody());
        case 404:
          throw new IOException("Table list not found");
        case 509:
          try {
            Thread.sleep(sleepTime);
          } catch (InterruptedException e) {
            throw (InterruptedIOException) new InterruptedIOException().initCause(e);
          }
          break;
        default:
          throw new IOException("get request to " + path.toString() + " request returned " + code);
      }
    }
    throw new IOException("get request to " + path.toString() + " request timed out");
  }
@return string representing the cluster's version if the endpoint does not exist, there is a
        timeout, or some other general failure mode
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/RemoteAdmin.java