org.apache.http.impl.pool
Class BasicConnPool

java.lang.Object
  extended by org.apache.http.pool.AbstractConnPool<HttpHost,HttpClientConnection,BasicPoolEntry>
      extended by org.apache.http.impl.pool.BasicConnPool
All Implemented Interfaces:
ConnPool<HttpHost,BasicPoolEntry>, ConnPoolControl<HttpHost>

@ThreadSafe
public class BasicConnPool
extends AbstractConnPool<HttpHost,HttpClientConnection,BasicPoolEntry>

A very basic ConnPool implementation that represents a pool of blocking HttpClientConnection connections identified by an HttpHost instance. Please note this pool implementation does not support complex routes via a proxy cannot differentiate between direct and proxied connections.

Since:
4.2
See Also:
HttpHost

Constructor Summary
BasicConnPool()
           
BasicConnPool(ConnFactory<HttpHost,HttpClientConnection> connFactory)
           
BasicConnPool(HttpParams params)
          Deprecated. (4.3) use BasicConnPool(SocketConfig, ConnectionConfig)
BasicConnPool(SocketConfig sconfig, ConnectionConfig cconfig)
           
 
Method Summary
protected  BasicPoolEntry createEntry(HttpHost host, HttpClientConnection conn)
          Creates a new entry for the given connection with the given route.
protected  boolean validate(BasicPoolEntry entry)
           
 
Methods inherited from class org.apache.http.pool.AbstractConnPool
closeExpired, closeIdle, enumAvailable, enumLeased, getDefaultMaxPerRoute, getMaxPerRoute, getMaxTotal, getRoutes, getStats, getTotalStats, getValidateAfterInactivity, isShutdown, lease, lease, onLease, onRelease, onReuse, release, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal, setValidateAfterInactivity, shutdown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicConnPool

public BasicConnPool(ConnFactory<HttpHost,HttpClientConnection> connFactory)

BasicConnPool

@Deprecated
public BasicConnPool(HttpParams params)
Deprecated. (4.3) use BasicConnPool(SocketConfig, ConnectionConfig)


BasicConnPool

public BasicConnPool(SocketConfig sconfig,
                     ConnectionConfig cconfig)
Since:
4.3

BasicConnPool

public BasicConnPool()
Since:
4.3
Method Detail

createEntry

protected BasicPoolEntry createEntry(HttpHost host,
                                     HttpClientConnection conn)
Description copied from class: AbstractConnPool
Creates a new entry for the given connection with the given route.

Specified by:
createEntry in class AbstractConnPool<HttpHost,HttpClientConnection,BasicPoolEntry>

validate

protected boolean validate(BasicPoolEntry entry)
Overrides:
validate in class AbstractConnPool<HttpHost,HttpClientConnection,BasicPoolEntry>


Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.