Package org.jboss.arquillian.warp.impl.shared

Examples of org.jboss.arquillian.warp.impl.shared.ResponsePayload


        try {
            enrich(responsePayload.get(), response.get(), nonWritingResponse.get());
        } catch (Exception e) {
            log.log(Level.WARNING, "Response enrichment failed", e);

            ResponsePayload exceptionPayload = new ResponsePayload(requestPayload.get().getSerialId());
            try {
                enrich(exceptionPayload, response.get(), nonWritingResponse.get());
            } catch (Exception ex) {
                log.log(Level.SEVERE, "Response enrichment failed to attach enrichment failure", ex);
            }
View Full Code Here


     * (non-Javadoc)
     * @see org.jboss.arquillian.warp.client.result.WarpGroupResult#getInspectionsForHitNumber(int)
     */
    @Override
    public List<Inspection> getInspectionsForHitNumber(int hitNumber) {
        ResponsePayload payload = (ResponsePayload) payloads.values().toArray()[hitNumber];
        return payload.getInspections();
    }
View Full Code Here

            content.readerIndex(payloadLength);
            content.discardReadBytes();

            HttpHeaders.setContentLength(response, originalLength - payloadLength);

            ResponsePayload payload = SerializationUtils.deserializeFromBase64(responseEnrichment);
            response.setStatus(HttpResponseStatus.valueOf(payload.getStatus()));

            for (Entry<String, List<String>> entry : payload.getHeaders().entrySet()) {
                response.setHeader(entry.getKey(), entry.getValue());
            }

            if (context != null) {
                verifyResponsePayload.fire(new VerifyResponsePayload(payload));
View Full Code Here

    public void processHttpRequest(@Observes ProcessHttpRequest event, ServiceLoader services, HttpServletRequest request,
            HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException {

        // setup responsePayload with temporary serialId before requestPayload is de-serialized
        responsePayload.set(new ResponsePayload(RequestPayload.FAILURE_SERIAL_ID));

        HttpRequestDeenricher requestDeenricher = services.onlyOne(HttpRequestDeenricher.class);

        if (requestDeenricher.isEnriched()) {

            RequestPayload payload = requestDeenricher.resolvePayload();
            responsePayload.set(new ResponsePayload(payload.getSerialId()));
            requestPayload.set(payload);

            processWarpRequest.fire(new ProcessWarpRequest());

        } else {
View Full Code Here

        final WarpContext context = WarpContextStore.get();
        try {

            long serialId = getSerialId(request);

            ResponsePayload payload = retrieveResponsePayload(serialId);

            if (context != null) {
                verifyResponsePayload.fire(new VerifyResponsePayload(payload));
                context.pushResponsePayload(payload);
            }
View Full Code Here

            return SerializationUtils.deserializeFromBytes(serializedPayload);
        }

        @Override
        public void perform() {
            ResponsePayload responsePayload = registry.get().retrieveResponsePayload(serialId);
            serializedPayload = SerializationUtils.serializeToBytes(responsePayload);
        }
View Full Code Here

    public void processHttpRequest(@Observes ProcessHttpRequest event, ServiceLoader services, HttpServletRequest request,
            HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException {

        // setup responsePayload with temporary serialId before requestPayload is de-serialized
        responsePayload.set(new ResponsePayload(RequestPayload.FAILURE_SERIAL_ID));

        HttpRequestDeenricher requestDeenricher = services.onlyOne(HttpRequestDeenricher.class);

        if (requestDeenricher.isEnriched()) {

            RequestPayload p = requestDeenricher.resolvePayload();
            long serialId = p.getSerialId();
            responsePayload.set(new ResponsePayload(serialId));
            response.setHeader(WarpCommons.ENRICHMENT_RESPONSE, Long.toString(serialId));
            requestPayload.set(p);

            processWarpRequest.fire(new ProcessWarpRequest());
View Full Code Here

     * (non-Javadoc)
     * @see org.jboss.arquillian.warp.client.result.WarpGroupResult#getInspectionsForHitNumber(int)
     */
    @Override
    public List<Inspection> getInspectionsForHitNumber(int hitNumber) {
        ResponsePayload payload = (ResponsePayload) payloads.values().toArray()[hitNumber];
        return payload.getInspections();
    }
View Full Code Here

        final WarpContext context = WarpContextStore.get();
        try {

            long serialId = getSerialId(request);

            ResponsePayload payload = retrieveResponsePayload(serialId);

            if (context != null) {
                verifyResponsePayload.fire(new VerifyResponsePayload(payload));
                context.pushResponsePayload(payload);
            }
View Full Code Here

            return SerializationUtils.deserializeFromBytes(serializedPayload);
        }

        @Override
        public void perform() {
            ResponsePayload responsePayload = registry.get().retrieveResponsePayload(serialId);
            serializedPayload = SerializationUtils.serializeToBytes(responsePayload);
        }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.warp.impl.shared.ResponsePayload

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.