org.apache.http.pool
Class PoolEntry<T,C>

java.lang.Object
  extended by org.apache.http.pool.PoolEntry<T,C>
Type Parameters:
T - route
C - connection
Direct Known Subclasses:
BasicNIOPoolEntry, BasicPoolEntry

@ThreadSafe
public class PoolEntry<T,C>
extends Object

Pool entry containing a connection object along with its route information.

Since:
4.2

Constructor Summary
PoolEntry(String id, T route, C conn)
           
PoolEntry(String id, T route, C conn, long timeToLive, TimeUnit tunit)
           
 
Method Summary
 C getConnection()
           
 long getCreated()
           
 long getExpiry()
           
 String getId()
           
 T getRoute()
           
 Object getState()
           
 long getUpdated()
           
 long getValidUnit()
           
 boolean isExpired(long now)
           
 void setState(Object state)
           
 String toString()
           
 void updateExpiry(long time, TimeUnit tunit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PoolEntry

public PoolEntry(String id,
                 T route,
                 C conn,
                 long timeToLive,
                 TimeUnit tunit)

PoolEntry

public PoolEntry(String id,
                 T route,
                 C conn)
Method Detail

getId

public String getId()

getRoute

public T getRoute()

getConnection

public C getConnection()

getCreated

public long getCreated()

getValidUnit

public long getValidUnit()

getState

public Object getState()

setState

public void setState(Object state)

getUpdated

public long getUpdated()

getExpiry

public long getExpiry()

updateExpiry

public void updateExpiry(long time,
                         TimeUnit tunit)

isExpired

public boolean isExpired(long now)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.