even more cleanup

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@561097 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roland Weber 2007-07-30 19:11:06 +00:00
parent 782fd75b1e
commit 6431580e82
2 changed files with 2 additions and 17 deletions

View File

@ -46,9 +46,6 @@ import org.apache.http.impl.conn.AbstractPoolEntry;
*/
public class BasicPoolEntry extends AbstractPoolEntry {
/** The connection pool. */
private AbstractConnPool connPool;
/** The connection operator. */
//@@@ move to base class, drop getOperator()?
private ClientConnectionOperator connOperator;
@ -65,28 +62,21 @@ public class BasicPoolEntry extends AbstractPoolEntry {
/**
* Creates a new pool entry.
*
* @param pool the connection pool
* @param op the connection operator
* @param route the planned route for the connection
* @param queue the reference queue for tracking GC of this entry,
* or <code>null</code>
*/
public BasicPoolEntry(AbstractConnPool pool,
ClientConnectionOperator op,
public BasicPoolEntry(ClientConnectionOperator op,
HttpRoute route,
ReferenceQueue queue) {
//@@@ create connection in base? or delay creation until needed?
super(op.createConnection(), route);
if (pool == null) {
throw new IllegalArgumentException
("Connection pool must not be null.");
}
if (route == null) {
throw new IllegalArgumentException
("Planned route must not be null.");
}
this.connPool = pool;
this.connOperator = op;
this.reference = new BasicPoolEntryRef(this, queue);
}
@ -110,10 +100,6 @@ public class BasicPoolEntry extends AbstractPoolEntry {
return this.reference;
}
protected final AbstractConnPool getConnPool() {
return this.connPool;
}
} // class BasicPoolEntry

View File

@ -394,8 +394,7 @@ public class ConnPoolByRoute extends AbstractConnPool {
LOG.debug("Creating new connection. " + rcp.route);
}
// the entry will create the connection when needed
BasicPoolEntry entry =
new BasicPoolEntry(this, op, rcp.route, refQueue);
BasicPoolEntry entry = new BasicPoolEntry(op, rcp.route, refQueue);
numConnections++;
rcp.numConnections++;