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

        this.ui = ui;
    }

    public Response toResponse(RuntimeException e) {
        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
                new ZError(ui.getRequestUri().toString(),
                        "Error processing request due to " + e.getMessage()
                        )).build();
    }
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.