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:
parent
782fd75b1e
commit
6431580e82
|
@ -46,9 +46,6 @@ import org.apache.http.impl.conn.AbstractPoolEntry;
|
||||||
*/
|
*/
|
||||||
public class BasicPoolEntry extends AbstractPoolEntry {
|
public class BasicPoolEntry extends AbstractPoolEntry {
|
||||||
|
|
||||||
/** The connection pool. */
|
|
||||||
private AbstractConnPool connPool;
|
|
||||||
|
|
||||||
/** The connection operator. */
|
/** The connection operator. */
|
||||||
//@@@ move to base class, drop getOperator()?
|
//@@@ move to base class, drop getOperator()?
|
||||||
private ClientConnectionOperator connOperator;
|
private ClientConnectionOperator connOperator;
|
||||||
|
@ -65,28 +62,21 @@ public class BasicPoolEntry extends AbstractPoolEntry {
|
||||||
/**
|
/**
|
||||||
* Creates a new pool entry.
|
* Creates a new pool entry.
|
||||||
*
|
*
|
||||||
* @param pool the connection pool
|
|
||||||
* @param op the connection operator
|
* @param op the connection operator
|
||||||
* @param route the planned route for the connection
|
* @param route the planned route for the connection
|
||||||
* @param queue the reference queue for tracking GC of this entry,
|
* @param queue the reference queue for tracking GC of this entry,
|
||||||
* or <code>null</code>
|
* or <code>null</code>
|
||||||
*/
|
*/
|
||||||
public BasicPoolEntry(AbstractConnPool pool,
|
public BasicPoolEntry(ClientConnectionOperator op,
|
||||||
ClientConnectionOperator op,
|
|
||||||
HttpRoute route,
|
HttpRoute route,
|
||||||
ReferenceQueue queue) {
|
ReferenceQueue queue) {
|
||||||
//@@@ create connection in base? or delay creation until needed?
|
//@@@ create connection in base? or delay creation until needed?
|
||||||
super(op.createConnection(), route);
|
super(op.createConnection(), route);
|
||||||
if (pool == null) {
|
|
||||||
throw new IllegalArgumentException
|
|
||||||
("Connection pool must not be null.");
|
|
||||||
}
|
|
||||||
if (route == null) {
|
if (route == null) {
|
||||||
throw new IllegalArgumentException
|
throw new IllegalArgumentException
|
||||||
("Planned route must not be null.");
|
("Planned route must not be null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connPool = pool;
|
|
||||||
this.connOperator = op;
|
this.connOperator = op;
|
||||||
this.reference = new BasicPoolEntryRef(this, queue);
|
this.reference = new BasicPoolEntryRef(this, queue);
|
||||||
}
|
}
|
||||||
|
@ -110,10 +100,6 @@ public class BasicPoolEntry extends AbstractPoolEntry {
|
||||||
return this.reference;
|
return this.reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final AbstractConnPool getConnPool() {
|
|
||||||
return this.connPool;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // class BasicPoolEntry
|
} // class BasicPoolEntry
|
||||||
|
|
||||||
|
|
|
@ -394,8 +394,7 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
||||||
LOG.debug("Creating new connection. " + rcp.route);
|
LOG.debug("Creating new connection. " + rcp.route);
|
||||||
}
|
}
|
||||||
// the entry will create the connection when needed
|
// the entry will create the connection when needed
|
||||||
BasicPoolEntry entry =
|
BasicPoolEntry entry = new BasicPoolEntry(op, rcp.route, refQueue);
|
||||||
new BasicPoolEntry(this, op, rcp.route, refQueue);
|
|
||||||
numConnections++;
|
numConnections++;
|
||||||
rcp.numConnections++;
|
rcp.numConnections++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue