Package com.facebook.presto.jdbc.internal.jetty.client.api

Examples of com.facebook.presto.jdbc.internal.jetty.client.api.Result


        // Reset to be ready for another response.
        reset();

        // Mark atomically the response as terminated and succeeded,
        // with respect to concurrency between request and response.
        Result result = exchange.terminateResponse(null);

        // It is important to notify *after* we reset and terminate
        // because the notification may trigger another request/response.
        HttpResponse response = exchange.getResponse();
        if (LOG.isDebugEnabled())
View Full Code Here


        dispose();

        // Mark atomically the response as terminated and failed,
        // with respect to concurrency between request and response.
        Result result = exchange.terminateResponse(failure);

        HttpResponse response = exchange.getResponse();
        if (LOG.isDebugEnabled())
            LOG.debug("Response failure {} {}", response, failure);
        List<Response.ResponseListener> listeners = exchange.getConversation().getResponseListeners();
View Full Code Here

        return true;
    }

    private void terminateResponse(HttpExchange exchange, Throwable failure)
    {
        Result result = exchange.terminateResponse(failure);
        terminateResponse(exchange, result);
    }
View Full Code Here

    }

    public void forwardSuccessComplete(List<Response.ResponseListener> listeners, Request request, Response response)
    {
        forwardSuccess(listeners, response);
        notifyComplete(listeners, new Result(request, response));
    }
View Full Code Here

    }

    public void forwardFailureComplete(List<Response.ResponseListener> listeners, Request request, Throwable requestFailure, Response response, Throwable responseFailure)
    {
        forwardFailure(listeners, response, responseFailure);
        notifyComplete(listeners, new Result(request, requestFailure, response, responseFailure));
    }
View Full Code Here

        if ((current & terminated) == terminated)
        {
            // Request and response terminated
            if (LOG.isDebugEnabled())
                LOG.debug("{} terminated", this);
            return new Result(getRequest(), getRequestFailure(), getResponse(), getResponseFailure());
        }
        return null;
    }
View Full Code Here

                LOG.debug("Failing {}: {}", this, cause);
            destination.getRequestNotifier().notifyFailure(request, cause);
            List<Response.ResponseListener> listeners = getConversation().getResponseListeners();
            ResponseNotifier responseNotifier = destination.getResponseNotifier();
            responseNotifier.notifyFailure(listeners, response, cause);
            responseNotifier.notifyComplete(listeners, new Result(request, cause, response, cause));
            return true;
        }
        else
        {
            return false;
View Full Code Here

                // Reset to be ready for another request.
                reset();

                // Mark atomically the request as terminated and succeeded,
                // with respect to concurrency between request and response.
                Result result = exchange.terminateRequest(null);

                Request request = exchange.getRequest();
                if (LOG.isDebugEnabled())
                    LOG.debug("Request success {}", request);
                HttpDestination destination = getHttpChannel().getHttpDestination();
View Full Code Here

        dispose();

        // Mark atomically the request as terminated and failed,
        // with respect to concurrency between request and response.
        Result result = exchange.terminateRequest(failure);

        Request request = exchange.getRequest();
        if (LOG.isDebugEnabled())
            LOG.debug("Request failure {} {}", exchange, failure);
        HttpDestination destination = getHttpChannel().getHttpDestination();
View Full Code Here

    private void terminateRequest(HttpExchange exchange, Throwable failure, boolean committed)
    {
        if (exchange != null)
        {
            Result result = exchange.terminateRequest(failure);
            terminateRequest(exchange, failure, committed, result);
        }
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.jetty.client.api.Result

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.