use AbstractHttpClientConnection lineParser and lineFormatter instead of local attributes

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@569839 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roland Weber 2007-08-26 16:51:40 +00:00
parent 31de8d1dcf
commit d117305774
2 changed files with 4 additions and 28 deletions

View File

@ -43,7 +43,6 @@ import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseFactory;
import org.apache.http.message.LineParser;
import org.apache.http.params.HttpParams;
import org.apache.http.impl.SocketHttpClientConnection;
import org.apache.http.io.HttpMessageParser;
@ -81,9 +80,6 @@ public class DefaultClientConnection extends SocketHttpClientConnection
/** Whether this connection is secure. */
private boolean connSecure;
/** The line parser to use, or <code>null</code> for the default parser. */
private LineParser lineParser;
// public default constructor
@ -134,26 +130,6 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} // shutdown
/**
* Obtains the line parser to be used for receiving messages.
*
* @return the line parser, or <code>null</code> for the default
*/
public LineParser getParser() {
return lineParser;
}
/**
* Specifies the line parser to use when receiving messages.
*
* @param parser the line parser to use, or
* <code>null</code> for the default
*/
public final void setParser(LineParser parser) {
lineParser = parser;
}
public void close() throws IOException {
LOG.debug("Connection closed");
@ -196,7 +172,7 @@ public class DefaultClientConnection extends SocketHttpClientConnection
final HttpResponseFactory responseFactory,
final HttpParams params) {
return new DefaultResponseParser
(buffer, lineParser, responseFactory, params);
(buffer, getLineParser(), responseFactory, params);
}

View File

@ -96,7 +96,7 @@ public class DefaultClientConnectionOperator
*
* @return the line parser, or <code>null</code> for the default
*/
public LineParser getParser() {
public LineParser getLineParser() {
return lineParser;
}
@ -106,7 +106,7 @@ public class DefaultClientConnectionOperator
*
* @param parser the line parser, or <code>null</code> for the default
*/
public void setParser(LineParser parser) {
public void setLineParser(LineParser parser) {
lineParser = parser;
}
@ -114,7 +114,7 @@ public class DefaultClientConnectionOperator
// non-javadoc, see interface ClientConnectionOperator
public OperatedClientConnection createConnection() {
DefaultClientConnection dcc = new DefaultClientConnection();
dcc.setParser(lineParser);
dcc.setLineParser(lineParser);
return dcc;
}