Package org.jboss.aerogear.controller.router.error

Examples of org.jboss.aerogear.controller.router.error.ErrorResponse.content()


    @Override
    public void writeResponse(final Object entity, final RouteContext routeContext) throws Exception {
        if (entity instanceof ErrorResponse) {
            final ErrorResponse errorResponse = (ErrorResponse) entity;
            routeContext.getResponse().setStatus(errorResponse.statusCode());
            writeJsonResponse(errorResponse.content(), routeContext);
        } else {
            if (entity != null) {
                writeJsonResponse(entity, routeContext);
            }
        }
View Full Code Here


    @Override
    public void writeResponse(final Object entity, final RouteContext routeContext) throws Exception {
        if (entity instanceof ErrorResponse) {
            final ErrorResponse errorResponse = (ErrorResponse) entity;
            routeContext.getResponse().setStatus(errorResponse.statusCode());
            writeJsonResponse(errorResponse.content(), routeContext);
        } else {
            if (entity != null) {
                writeJsonResponse(entity, routeContext);
            }
        }
View Full Code Here

    @Override
    public void writeResponse(final Object entity, final RouteContext routeContext) throws Exception {
        if (entity instanceof ErrorResponse) {
            final ErrorResponse errorResponse = (ErrorResponse) entity;
            routeContext.getResponse().setStatus(errorResponse.statusCode());
            writeJsonResponse(errorResponse.content(), routeContext);
        } else {
            if (entity != null) {
                writeJsonResponse(entity, routeContext);
            }
        }
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.