Package org.apache.http.client

Examples of org.apache.http.client.ClientProtocolException


        }

        try {
            return director.execute(target, request, execContext);
        } catch(HttpException httpException) {
            throw new ClientProtocolException(httpException);
        }
    } // execute
View Full Code Here


        final URI requestURI = request.getURI();
        if (requestURI.isAbsolute()) {
            target = URIUtils.extractHost(requestURI);
            if (target == null)
                throw new ClientProtocolException("URI does not specify a valid host name: " + requestURI);
        }
        return target;
    }
View Full Code Here

            } else {
                return CloseableHttpResponseProxy.newProxy(
                        director.execute(target, request, execContext));
            }
        } catch(final HttpException httpException) {
            throw new ClientProtocolException(httpException);
        }
    }
View Full Code Here

            }
            setupContext(localcontext);
            final HttpRoute route = determineRoute(target, wrapper, localcontext);
            return this.execChain.execute(route, wrapper, localcontext, execAware);
        } catch (final HttpException httpException) {
            throw new ClientProtocolException(httpException);
        }
    }
View Full Code Here

            }
            return revalidateCacheEntry(target, request, context, entry);
        } catch (final IOException ioex) {
            return handleRevalidationFailure(request, context, entry, now);
        } catch (final ProtocolException e) {
            throw new ClientProtocolException(e);
        }
    }
View Full Code Here

          statusline.getStatusCode(), statusline.getReasonPhrase());
    }
    HttpEntity entity = response.getEntity();
    if (entity == null) {
      // Should _almost_ never happen with HTTP GET requests.
      throw new ClientProtocolException("Empty entity");
    }
    long maxlen = httpclient.getParams().getLongParameter(DroidsHttpClient.MAX_BODY_LENGTH, 0);
    return new HttpContentEntity(entity, maxlen);
  }
View Full Code Here

          statusline.getStatusCode(), statusline.getReasonPhrase());
    }
    HttpEntity entity = response.getEntity();
    if (entity == null) {
      // Should _almost_ never happen with HTTP GET requests.
      throw new ClientProtocolException("Empty entity");
    }
    long maxlen = getHttpClient().getParams().getLongParameter(DroidsHttpClient.MAX_BODY_LENGTH, 0);
    return new AdvancedHttpContentEntity(entity,response.getAllHeaders(),maxlen);
  }
View Full Code Here

                }
            };
            future.setDelegate(revalidateCacheEntry(target, request, context, entry, future));
            return future;
        } catch (final ProtocolException e) {
            throw new ClientProtocolException(e);
        }
    }
View Full Code Here

        }

        try {
            return director.execute(target, request, execContext);
        } catch(HttpException httpException) {
            throw new ClientProtocolException(httpException);
        }
    }
View Full Code Here

            } else {
                return CloseableHttpResponseProxy.newProxy(
                        director.execute(target, request, execContext));
            }
        } catch(final HttpException httpException) {
            throw new ClientProtocolException(httpException);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.http.client.ClientProtocolException

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.