FileDocCategorySizeDatePackage
BasicPoolEntryRef.javaAPI DocAndroid 1.5 API2783Wed May 06 22:41:10 BST 2009org.apache.http.impl.conn.tsccm

BasicPoolEntryRef

public 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
route
The planned route of the entry.
Constructors Summary
public BasicPoolEntryRef(BasicPoolEntry entry, ReferenceQueue queue)
Creates a new reference to a pool entry.

param
entry the pool entry, must not be null
param
queue the reference queue, or null

        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.HttpRoutegetRoute()
Obtain the planned route for the referenced entry. The planned route is still available, even if the entry is gone.

return
the planned route

        return this.route;