mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
Removed unused method from the ClientRequestDirector interface
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@640959 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
97bb41b687
commit
5956d0ed5f
@ -38,9 +38,6 @@
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpException;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.http.conn.ManagedClientConnection;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A client-side request director.
|
||||
@ -100,19 +97,4 @@ HttpResponse execute(HttpHost target, HttpRequest request,
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
* Obtains the connection to which the response is tied.
|
||||
* Responses with a non-buffered response entity are tied to
|
||||
* their connection until the entity is consumed or discarded.
|
||||
* Until then, the connection must not be released. Afterwards,
|
||||
* it must be released.
|
||||
*
|
||||
* @return the connection to which the response from
|
||||
* {@link #execute execute} is tied, or
|
||||
* <code>null</code> if there is none
|
||||
*/
|
||||
ManagedClientConnection getConnection()
|
||||
;
|
||||
|
||||
|
||||
} // class ClientRequestDirector
|
||||
|
@ -57,6 +57,7 @@
|
||||
import org.apache.http.protocol.BasicHttpProcessor;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.http.protocol.BasicHttpContext;
|
||||
import org.apache.http.protocol.HttpProcessor;
|
||||
|
||||
/**
|
||||
* Convenience base class for HTTP client implementations.
|
||||
@ -485,7 +486,7 @@ public final HttpResponse execute(HttpHost target, HttpRequest request,
|
||||
context = new BasicHttpContext(getDefaultContext());
|
||||
}
|
||||
// Create a director for this request
|
||||
director = new DefaultClientRequestDirector(
|
||||
director = createClientRequestDirector(
|
||||
getConnectionManager(),
|
||||
getConnectionReuseStrategy(),
|
||||
getRoutePlanner(),
|
||||
@ -508,6 +509,28 @@ public final HttpResponse execute(HttpHost target, HttpRequest request,
|
||||
|
||||
} // execute
|
||||
|
||||
|
||||
protected ClientRequestDirector createClientRequestDirector(
|
||||
final ClientConnectionManager conman,
|
||||
final ConnectionReuseStrategy reustrat,
|
||||
final HttpRoutePlanner rouplan,
|
||||
final HttpProcessor httpProcessor,
|
||||
final HttpRequestRetryHandler retryHandler,
|
||||
final RedirectHandler redirectHandler,
|
||||
final AuthenticationHandler targetAuthHandler,
|
||||
final AuthenticationHandler proxyAuthHandler,
|
||||
final HttpParams params) {
|
||||
return new DefaultClientRequestDirector(
|
||||
conman,
|
||||
reustrat,
|
||||
rouplan,
|
||||
httpProcessor,
|
||||
retryHandler,
|
||||
redirectHandler,
|
||||
targetAuthHandler,
|
||||
proxyAuthHandler,
|
||||
params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains parameters for executing a request.
|
||||
|
@ -214,12 +214,6 @@ public DefaultClientRequestDirector(
|
||||
} // constructor
|
||||
|
||||
|
||||
// non-javadoc, see interface ClientRequestDirector
|
||||
public ManagedClientConnection getConnection() {
|
||||
return managedConn;
|
||||
}
|
||||
|
||||
|
||||
private RequestWrapper wrapRequest(
|
||||
final HttpRequest request) throws ProtocolException {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user