Examples of ClientWarpExecutionException


Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

        try {
            String requestEnrichment = SerializationUtils.serializeToBase64(payload);
            request.setHeader(WarpCommons.ENRICHMENT_REQUEST, Arrays.asList(requestEnrichment));
        } catch (Throwable originalException) {
            ClientWarpExecutionException explainingException = new ClientWarpExecutionException("enriching request failed:\n"
                    + originalException.getMessage(), originalException);
            warpContext().pushException(explainingException);
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

                if (synchronization.isWaitingForRequests()) {
                    try {
                        tryEnrichRequest.fire(new FilterHttpRequest(request, enrichmentService));

                    } catch (Exception originalException) {
                        ClientWarpExecutionException explainingException = new ClientWarpExecutionException(
                                "enriching request failed: " + originalException.getMessage(), originalException);
                        context.pushException(explainingException);
                    }
                }
            }
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

        } catch (Exception originalException) {
            response.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);

            if (context != null) {

                ClientWarpExecutionException explainingException;

                if (originalException instanceof ClientWarpExecutionException) {
                    explainingException = (ClientWarpExecutionException) originalException;
                } else {
                    explainingException = new ClientWarpExecutionException("deenriching response failed: "
                            + originalException.getMessage(), originalException);
                }

                context.pushException(explainingException);
            } else {
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

                WarpExecutionException explainingException;

                if (originalException instanceof WarpExecutionException) {
                    explainingException = (WarpExecutionException) originalException;
                } else {
                    explainingException = new ClientWarpExecutionException("deenriching response failed: "
                            + originalException.getMessage(), originalException);
                }

                context.pushException(explainingException);
            } else {
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

                if (synchronization.isWaitingForRequests()) {
                    try {
                        tryEnrichRequest.fire(new FilterHttpRequest(new HttpRequestWrapper(request)));

                    } catch (Exception originalException) {
                        ClientWarpExecutionException explainingException = new ClientWarpExecutionException(
                                "enriching request failed: " + originalException.getMessage(), originalException);
                        context.pushException(explainingException);
                    }
                }
            }
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

                WarpExecutionException explainingException;

                if (originalException instanceof WarpExecutionException) {
                    explainingException = (WarpExecutionException) originalException;
                } else {
                    explainingException = new ClientWarpExecutionException("deenriching response failed: "
                            + originalException.getMessage(), originalException);
                }

                context.pushException(explainingException);
            } else {
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

            org.jboss.netty.handler.codec.http.HttpRequest nettyHttpRequest = ((HttpRequestWrapper) request).unwrap();
            nettyHttpRequest.setHeader(WarpCommons.ENRICHMENT_REQUEST, Arrays.asList(Long.toString(serialId)));
        } catch (Throwable originalException) {
            Throwable cause = Rethrow.getOriginalCause(originalException);
            ClientWarpExecutionException explainingException = new ClientWarpExecutionException("enriching request failed; caused by:\n"
                    + cause.getClass().getName() + ": " + cause.getMessage(), originalException);
            warpContext().pushException(explainingException);
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

            io.netty.handler.codec.http.HttpRequest nettyHttpRequest = ((HttpRequestWrapper) request).unwrap();
            nettyHttpRequest.headers().set(WarpCommons.ENRICHMENT_REQUEST, Arrays.asList(Long.toString(serialId)));
        } catch (Throwable originalException) {
            Throwable cause = Rethrow.getOriginalCause(originalException);
            ClientWarpExecutionException explainingException = new ClientWarpExecutionException("enriching request failed; caused by:\n"
                    + cause.getClass().getName() + ": " + cause.getMessage(), originalException);
            warpContext().pushException(explainingException);
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.warp.exception.ClientWarpExecutionException

                        if (httpObject instanceof HttpRequest) {
                            tryEnrichRequest.fire(new FilterHttpRequest(new HttpRequestWrapper(this.request)));
                        }
                    }
                } catch (Exception originalException) {
                    ClientWarpExecutionException explainingException = new ClientWarpExecutionException(
                            "enriching request failed: " + originalException.getMessage(), originalException);
                    context.pushException(explainingException);
                }

                return null;
            }

            @Override
            public HttpObject responsePost(HttpObject httpObject) {

                try {
                    if (this.request instanceof HttpRequest && httpObject instanceof HttpResponse) {
                        HttpResponse response = (HttpResponse) httpObject;

                        tryDeenrichResponse.fire(new FilterHttpResponse(this.request, response));

                        TransformHttpResponse transformEvent = new TransformHttpResponse(request, response);
                        transformHttpResponse.fire(transformEvent);

                        return transformEvent.getResponse();
                    }

                } catch (Exception originalException) {
                    final WarpContext context = WarpContextStore.get();

                    if (context == null) {
                        log.log(Level.WARNING, originalException.getMessage(), originalException);
                        return httpObject;
                    }
                    ClientWarpExecutionException explainingException = new ClientWarpExecutionException(
                            "deenriching response failed: " + originalException.getMessage(), originalException);
                    context.pushException(explainingException);
                }

                return httpObject;
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.