Package org.gatein.pc.api.invocation.response

Examples of org.gatein.pc.api.invocation.response.ErrorResponse


            //
            return sb.toString();
         }
         else if (response instanceof ErrorResponse)
         {
            ErrorResponse errorResponse = (ErrorResponse)response;

            //
            return "Error:" + errorResponse.getMessage();
         }
         else
         {
            return "Todo format:" + response;
         }
View Full Code Here


            PortletInvocationResponse pir = portletResponse.getResponse();

            //
            if (pir instanceof ErrorResponse)
            {
               ErrorResponse errorResponse = (ErrorResponse)pir;

               //
               if (errorResponse.getCause() != null)
               {
                  throw new ServletException(Constants.PORTLET_ERROR, errorResponse.getCause());
               }
               else
               {
                  throw new ServletException(Constants.PORTLET_ERROR);
               }
View Full Code Here

         //
         return rt;
      }
      else if (portletResponse instanceof ErrorResponse)
      {
         ErrorResponse error = (ErrorResponse)portletResponse;

         //
         handleError(renderResponse, Constants.PORTLET_ERROR, error.getCause(), error.getMessage());

         //
         return SKIP_BODY;
      }
      else if (portletResponse instanceof UnavailableResponse)
View Full Code Here

            }

            // todo: handle the error response better than this.
            if (!(piResponse instanceof UpdateNavigationalStateResponse)) {
                if (piResponse instanceof ErrorResponse) {
                    ErrorResponse errorResponse = (ErrorResponse) piResponse;
                    throw (Exception) errorResponse.getCause();
                } else {
                    throw new Exception("Unexpected response type [" + piResponse
                            + "]. Expected a UpdateNavigationResponse or an ErrorResponse.");
                }
            }
View Full Code Here

                String contentType;
                String charset;
                Object content;
                if (!(portletResponse instanceof ContentResponse)) {
                    if (portletResponse instanceof ErrorResponse) {
                        ErrorResponse errorResponse = (ErrorResponse) portletResponse;
                        Throwable cause = errorResponse.getCause();
                        if (cause != null) {
                            log.trace("Got error response from portlet", cause);
                        } else if (errorResponse.getMessage() != null) {
                            log.trace("Got error response from portlet:" + errorResponse.getMessage());
                        } else {
                            log.trace("Got error response from portlet");
                        }
                    } else {
                        log.trace("Unexpected response type [" + portletResponse
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.invocation.response.ErrorResponse

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.