Package org.apache.wink.client.internal.handlers

Examples of org.apache.wink.client.internal.handlers.ClientResponseImpl


        cr.setEntity(is);
        return cr;
    }

    private ClientResponse createResponse(final ClientRequest request, final Response response) {
        final ClientResponseImpl cr = new ClientResponseImpl();
        cr.setStatusCode(response.getStatusCode());
        cr.setMessage(response.getStatusText());
        cr.getAttributes().putAll(request.getAttributes());

        // FIXME: Should we use a constant here to avoid creating this dummy runnable every time?
        cr.setContentConsumer(new Runnable()
        {
            public void run() {
                // empty
            }
        });
View Full Code Here


        cr.setEntity(is);
        return cr;
    }

    private ClientResponse createResponse(final ClientRequest request, final Response response) {
        final ClientResponseImpl cr = new ClientResponseImpl();
        cr.setStatusCode(response.getStatusCode());
        cr.setMessage(response.getStatusText());
        cr.getAttributes().putAll(request.getAttributes());
        processResponseHeaders(cr, response);
        return cr;
    }
View Full Code Here

        response.setEntity(is);
        return response;
    }

    private ClientResponse createResponse(ClientRequest request, final HttpResponse httpResponse) {
        final ClientResponseImpl response = new ClientResponseImpl();
        StatusLine statusLine = httpResponse.getStatusLine();
        response.setStatusCode(statusLine.getStatusCode());
        response.setMessage(statusLine.getReasonPhrase());
        response.getAttributes().putAll(request.getAttributes());
        response.setContentConsumer(new Runnable() {
           
            public void run() {
              HttpEntity entity = httpResponse.getEntity();
              if (entity != null) {
                  try {
View Full Code Here

TOP

Related Classes of org.apache.wink.client.internal.handlers.ClientResponseImpl

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.