Package javax.ws.rs

Examples of javax.ws.rs.ClientErrorException


        switch (statusFamily) {
            case REDIRECTION:
                webAppException = new RedirectionException(response);
                break;
            case CLIENT_ERROR:
                webAppException = new ClientErrorException(response);
                break;
            case SERVER_ERROR:
                webAppException = new ServerErrorException(response);
                break;
            default:
View Full Code Here


    }
    private void reportError(String message, Exception ex, int status) {
        LOG.warning(message);
        Response response = Response.status(status).type("text/plain").entity(message).build();
        if (ex == null) {
            throw status < 500 ? new ClientErrorException(response) : new ServerErrorException(response);
        } else {
            throw status < 500 ? new ClientErrorException(response, ex) : new ServerErrorException(response, ex);
        }
    }
View Full Code Here

        if (!"OPTIONS".equalsIgnoreCase(httpMethod) && logNow) {
            LOG.warning(errorMsg.toString());
        }
        Response response =
            createResponse(resource, message, errorMsg.toString(), status, methodMatched == 0);
        throw new ClientErrorException(response);
       
    }   
View Full Code Here

TOP

Related Classes of javax.ws.rs.ClientErrorException

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.