Renamed ClientRequestDirector to RequestDirector, ClientResponseHandler to ResponseHandler. Client prefix is superfluous due to the package name

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@676020 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2008-07-11 16:38:49 +00:00
parent b5bac2833f
commit 17d75864d9
7 changed files with 23 additions and 23 deletions

View File

@ -31,14 +31,14 @@
package org.apache.http.examples.client;
import org.apache.http.client.ClientResponseHandler;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
/**
* This example demonstrates the use of the {@link ClientResponseHandler} to simply
* This example demonstrates the use of the {@link ResponseHandler} to simply
* the process of processing the HTTP response and releasing associated resources.
*/
public class ClientWithResponseHandler {
@ -52,7 +52,7 @@ public class ClientWithResponseHandler {
System.out.println("executing request " + httpget.getURI());
// Create a response handler
ClientResponseHandler<String> responseHandler = new BasicResponseHandler();
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String responseBody = httpclient.execute(httpget, responseHandler);
System.out.println(responseBody);

View File

@ -177,7 +177,7 @@ public interface HttpClient {
*/
<T> T execute(
HttpUriRequest request,
ClientResponseHandler<? extends T> responseHandler)
ResponseHandler<? extends T> responseHandler)
throws IOException, ClientProtocolException
;
@ -194,7 +194,7 @@ public interface HttpClient {
*/
<T> T execute(
HttpUriRequest request,
ClientResponseHandler<? extends T> responseHandler,
ResponseHandler<? extends T> responseHandler,
HttpContext context)
throws IOException, ClientProtocolException
;
@ -217,7 +217,7 @@ public interface HttpClient {
<T> T execute(
HttpHost target,
HttpRequest request,
ClientResponseHandler<? extends T> responseHandler)
ResponseHandler<? extends T> responseHandler)
throws IOException, ClientProtocolException
;
@ -241,7 +241,7 @@ public interface HttpClient {
<T> T execute(
HttpHost target,
HttpRequest request,
ClientResponseHandler<? extends T> responseHandler,
ResponseHandler<? extends T> responseHandler,
HttpContext context)
throws IOException, ClientProtocolException
;

View File

@ -60,7 +60,7 @@ import org.apache.http.protocol.HttpContext;
*
* @since 4.0
*/
public interface ClientRequestDirector {
public interface RequestDirector {
/**

View File

@ -43,7 +43,7 @@ import org.apache.http.HttpResponse;
*
* @since 4.0
*/
public interface ClientResponseHandler<T> {
public interface ResponseHandler<T> {
/**
* Processes an {@link HttpResponse} and returns some value

View File

@ -44,8 +44,8 @@ import org.apache.http.HttpResponseInterceptor;
import org.apache.http.auth.AuthSchemeRegistry;
import org.apache.http.client.AuthenticationHandler;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.ClientRequestDirector;
import org.apache.http.client.ClientResponseHandler;
import org.apache.http.client.RequestDirector;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.CookieStore;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.HttpClient;
@ -516,7 +516,7 @@ public abstract class AbstractHttpClient implements HttpClient {
// a null context is acceptable, default context created below
HttpContext execContext = null;
ClientRequestDirector director = null;
RequestDirector director = null;
// Initialize the request execution context making copies of
// all shared objects that are potentially threading unsafe.
@ -565,7 +565,7 @@ public abstract class AbstractHttpClient implements HttpClient {
} // execute
protected ClientRequestDirector createClientRequestDirector(
protected RequestDirector createClientRequestDirector(
final HttpRequestExecutor requestExec,
final ClientConnectionManager conman,
final ConnectionReuseStrategy reustrat,
@ -617,7 +617,7 @@ public abstract class AbstractHttpClient implements HttpClient {
// non-javadoc, see interface HttpClient
public <T> T execute(
final HttpUriRequest request,
final ClientResponseHandler<? extends T> responseHandler)
final ResponseHandler<? extends T> responseHandler)
throws IOException, ClientProtocolException {
if (responseHandler == null) {
throw new IllegalArgumentException
@ -631,7 +631,7 @@ public abstract class AbstractHttpClient implements HttpClient {
// non-javadoc, see interface HttpClient
public <T> T execute(
final HttpUriRequest request,
final ClientResponseHandler<? extends T> responseHandler,
final ResponseHandler<? extends T> responseHandler,
final HttpContext context)
throws IOException, ClientProtocolException {
if (responseHandler == null) {
@ -647,7 +647,7 @@ public abstract class AbstractHttpClient implements HttpClient {
public <T> T execute(
final HttpHost target,
final HttpRequest request,
final ClientResponseHandler<? extends T> responseHandler)
final ResponseHandler<? extends T> responseHandler)
throws IOException, ClientProtocolException {
if (responseHandler == null) {
throw new IllegalArgumentException
@ -662,7 +662,7 @@ public abstract class AbstractHttpClient implements HttpClient {
public <T> T execute(
final HttpHost target,
final HttpRequest request,
final ClientResponseHandler<? extends T> responseHandler,
final ResponseHandler<? extends T> responseHandler,
final HttpContext context)
throws IOException, ClientProtocolException {
if (responseHandler == null) {

View File

@ -37,12 +37,12 @@ import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.ClientResponseHandler;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.HttpResponseException;
import org.apache.http.util.EntityUtils;
/**
* A {@link ClientResponseHandler} that returns the response body as a String
* A {@link ResponseHandler} that returns the response body as a String
* for successful (2xx) responses. If the response code was >= 300, the response
* body is consumed and an {@link HttpResponseException} is thrown.
*
@ -56,7 +56,7 @@ import org.apache.http.util.EntityUtils;
*
* @since 4.0
*/
public class BasicResponseHandler implements ClientResponseHandler<String> {
public class BasicResponseHandler implements ResponseHandler<String> {
/**
* Returns the response body as a String if the response was successful (a

View File

@ -58,7 +58,7 @@ import org.apache.http.auth.AuthenticationException;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.client.AuthenticationHandler;
import org.apache.http.client.ClientRequestDirector;
import org.apache.http.client.RequestDirector;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.client.NonRepeatableRequestException;
@ -94,7 +94,7 @@ import org.apache.http.protocol.HttpProcessor;
import org.apache.http.protocol.HttpRequestExecutor;
/**
* Default implementation of {@link ClientRequestDirector}.
* Default implementation of {@link RequestDirector}.
* <br/>
* This class replaces the <code>HttpMethodDirector</code> in HttpClient 3.
*
@ -106,7 +106,7 @@ import org.apache.http.protocol.HttpRequestExecutor;
*
* @since 4.0
*/
public class DefaultClientRequestDirector implements ClientRequestDirector {
public class DefaultClientRequestDirector implements RequestDirector {
private final Log log = LogFactory.getLog(getClass());