Examples of CreateResponse


Examples of org.apache.zookeeper.proto.CreateResponse

        final String serverPath = prependChroot(clientPath);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.create);
        CreateRequest request = new CreateRequest();
        CreateResponse response = new CreateResponse();
        request.setData(data);
        request.setFlags(createMode.toFlag());
        request.setPath(serverPath);
        if (acl != null && acl.size() == 0) {
            throw new KeeperException.InvalidACLException();
        }
        request.setAcl(acl);
        ReplyHeader r = cnxn.submitRequest(h, request, response, null);
        if (r.getErr() != 0) {
            throw KeeperException.create(KeeperException.Code.get(r.getErr()),
                    clientPath);
        }
        if (cnxn.chrootPath == null) {
            return response.getPath();
        } else {
            return response.getPath().substring(cnxn.chrootPath.length());
        }
    }
View Full Code Here

Examples of org.apache.zookeeper.proto.CreateResponse

        final String serverPath = prependChroot(clientPath);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.create);
        CreateRequest request = new CreateRequest();
        CreateResponse response = new CreateResponse();
        ReplyHeader r = new ReplyHeader();
        request.setData(data);
        request.setFlags(createMode.toFlag());
        request.setPath(serverPath);
        request.setAcl(acl);
View Full Code Here

Examples of org.apache.zookeeper.proto.CreateResponse

        throws KeeperException, InterruptedException
    {
        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.create);
        CreateRequest request = new CreateRequest();
        CreateResponse response = new CreateResponse();
        request.setData(data);
        request.setFlags(createMode.toFlag());
        request.setPath(path);
        if (acl != null && acl.size() == 0) {
            throw new KeeperException.InvalidACLException();
        }
        request.setAcl(acl);
        ReplyHeader r = cnxn.submitRequest(h, request, response, null);
        if (r.getErr() != 0) {
            throw KeeperException.create(r.getErr(), path);
        }
        return response.getPath();
    }
View Full Code Here

Examples of org.apache.zookeeper.proto.CreateResponse

            CreateMode createMode,  StringCallback cb, Object ctx)
    {
        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.create);
        CreateRequest request = new CreateRequest();
        CreateResponse response = new CreateResponse();
        ReplyHeader r = new ReplyHeader();
        request.setData(data);
        request.setFlags(createMode.toFlag());
        request.setPath(path);
        request.setAcl(acl);
View Full Code Here

Examples of org.apache.zookeeper.proto.CreateResponse

                      } else {
                          cb.processResult(rc, clientPath, p.ctx, null, null);
                      }
                  } else if (p.response instanceof CreateResponse) {
                      StringCallback cb = (StringCallback) p.cb;
                      CreateResponse rsp = (CreateResponse) p.response;
                      if (rc == 0) {
                          cb.processResult(rc, clientPath, p.ctx,
                                  (chrootPath == null
                                          ? rsp.getPath()
                                          : rsp.getPath()
                                    .substring(chrootPath.length())));
                      } else {
                          cb.processResult(rc, clientPath, p.ctx, null);
                      }
                  } else if (p.cb instanceof VoidCallback) {
View Full Code Here

Examples of org.apache.zookeeper.proto.CreateResponse

                break;
            }
            case OpCode.create: {
                lastOp = "CREA";
                rsp = new CreateResponse(rc.path);
                err = Code.get(rc.err);
                break;
            }
            case OpCode.delete: {
                lastOp = "DELE";
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.proto.CreateResponse

                cnxn.finishSessionInit(true);
                return;
            }
            case OpCode.create: {
                lastOp = "CREA";
                rsp = new CreateResponse(rc.path);
                err = Code.get(rc.err);
                break;
            }
            case OpCode.delete: {
                lastOp = "DELE";
View Full Code Here

Examples of org.dmd.dmp.server.extended.CreateResponse

  @Override
  public CreateResponseDMO create(CreateRequestDMO createRequest) {
    // All requests are immediately wrapped for use on the server. This includes
    // associating the request with the originating HttpServletRequest.
    CreateRequest   request    = new CreateRequest(createRequest, getThreadLocalRequest());
    CreateResponse  response   = null;
   
    if (request.isTrackingEnabled())
      logger.trace("Received by DMP servlet:\n" + request.toOIF());
   
    try {
      response = (CreateResponse) pluginManager.getSecurityManager().validateSession(request);
     
      if (response == null){
        SessionRI session = pluginManager.getSecurityManager().getSession(request);

        response = session.handleCreateRequest(request);
      }
    } catch (DmcValueException e) {
      response = (CreateResponse) request.getErrorResponse();
      response.setResponseText(e.toString());
     
      e.printStackTrace();
    }   

    return(response.getDMO());
  }
View Full Code Here

Examples of org.dmd.dmp.server.extended.CreateResponse

  }
 
  public CreateResponse handleCreateRequest(CreateRequest request){
    request.setOriginatorID(cacheRegistration.getID());
   
    CreateResponse rc = request.getResponse();
    rc.setLastResponse(false);
   
    requestTracker.processRequest(request, this);
   
    logger.debug("Sending synchronous response for CreateRequest: " + rc);
   
View Full Code Here

Examples of org.dmd.dmp.server.extended.CreateResponse

        super(new CreateResponseDMO(mods), org.dmd.dmp.server.generated.DmpSchemaAG._CreateResponse);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGeneratorNewest.dumpWrapper(BaseDMWGeneratorNewest.java:470)
    public CreateResponse getModificationRecorder(){
        CreateResponse rc = new CreateResponse();
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }
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.