Examples of ZError


Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

        try {
            version = Integer.parseInt(versionParam);
        } catch (NumberFormatException e) {
            throw new WebApplicationException(Response.status(
                    Response.Status.BAD_REQUEST).entity(
                    new ZError(ui.getRequestUri().toString(), path
                            + " bad version " + versionParam)).build());
        }

        zk.delete(path, version);
    }
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

    private static void throwNotFound(String path, UriInfo ui)
            throws WebApplicationException {
        throw new WebApplicationException(Response.status(
                Response.Status.NOT_FOUND).entity(
                new ZError(ui.getRequestUri().toString(), path + " not found"))
                .build());
    }
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

            @DefaultValue("5") @QueryParam("expire") String expire,
            @Context UriInfo ui) {
        if (!op.equals("create")) {
            throw new WebApplicationException(Response.status(
                    Response.Status.BAD_REQUEST).entity(
                    new ZError(ui.getRequestUri().toString(), "")).build());
        }

        int expireInSeconds;
        try {
            expireInSeconds = Integer.parseInt(expire);
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

    private static void throwNotFound(String session, UriInfo ui)
            throws WebApplicationException {
        throw new WebApplicationException(Response.status(
                Response.Status.NOT_FOUND).entity(
                new ZError(ui.getRequestUri().toString(), session
                        + " not found")).build());
    }
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

            message = "Error processing request for " + path
                + " : " + e.getMessage();
        }

        return Response.status(status).entity(
                new ZError(ui.getRequestUri().toString(), message)).build();
    }
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

            WebApplicationException ie =(WebApplicationException) e;
            return ie.getResponse();
        }

        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
                new ZError(ui.getRequestUri().toString(),
                        "Error processing request due to " + e
                        )).build();
    }
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

        try {
            version = Integer.parseInt(versionParam);
        } catch (NumberFormatException e) {
            throw new WebApplicationException(Response.status(
                    Response.Status.BAD_REQUEST).entity(
                    new ZError(ui.getRequestUri().toString(),
                            path + " bad version " + versionParam)).build());
        }

        if (setNull.equals("true")) {
            data = null;
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

        try {
            version = Integer.parseInt(versionParam);
        } catch (NumberFormatException e) {
            throw new WebApplicationException(Response.status(
                    Response.Status.BAD_REQUEST).entity(
                    new ZError(ui.getRequestUri().toString(),
                            path + " bad version " + versionParam)).build());
        }

        if (setNull.equals("true")) {
            data = null;
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

        path = "/" + path + "/" + name;

        if (!op.equals("create")) {
            throw new WebApplicationException(Response.status(
                    Response.Status.BAD_REQUEST).entity(
                    new ZError(ui.getRequestUri().toString(),
                            path + " bad operaton " + op)).build());
        }

        if (setNull.equals("true")) {
            data = null;
View Full Code Here

Examples of org.apache.zookeeper.server.jersey.jaxb.ZError

        path = "/" + path + "/" + name;

        if (!op.equals("create")) {
            throw new WebApplicationException(Response.status(
                    Response.Status.BAD_REQUEST).entity(
                    new ZError(ui.getRequestUri().toString(),
                            path + " bad operaton " + op)).build());
        }

        if (setNull.equals("true")) {
            data = null;
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.