BasicPoolEntryRefpublic class BasicPoolEntryRef extends WeakReference A weak reference to a {@link BasicPoolEntry BasicPoolEntry}.
This reference explicitly keeps the planned route, so the connection
can be reclaimed if it is lost to garbage collection. |
Fields Summary |
---|
private final HttpRoute | routeThe planned route of the entry. |
Constructors Summary |
---|
public BasicPoolEntryRef(BasicPoolEntry entry, ReferenceQueue queue)Creates a new reference to a pool entry.
super(entry, queue);
if (entry == null) {
throw new IllegalArgumentException
("Pool entry must not be null.");
}
route = entry.getPlannedRoute();
|
Methods Summary |
---|
public final org.apache.http.conn.routing.HttpRoute | getRoute()Obtain the planned route for the referenced entry.
The planned route is still available, even if the entry is gone.
return this.route;
|
|