org.apache.http.impl.nio.pool
Class BasicNIOConnPool

java.lang.Object
  extended by org.apache.http.nio.pool.AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>
      extended by org.apache.http.impl.nio.pool.BasicNIOConnPool
All Implemented Interfaces:
ConnPoolControl<HttpHost>

@ThreadSafe
public class BasicNIOConnPool
extends AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

Basic non-blocking IOSession pool.

The following parameters can be used to customize the behavior of this class:

Since:
4.2

Constructor Summary
BasicNIOConnPool(ConnectingIOReactor ioreactor, HttpParams params)
           
 
Method Summary
protected  void closeEntry(BasicNIOPoolEntry entry)
           
protected  IOSession createConnection(HttpHost route, IOSession session)
           
protected  BasicNIOPoolEntry createEntry(HttpHost host, IOSession conn)
           
 Future<BasicNIOPoolEntry> lease(HttpHost route, Object state)
           
 Future<BasicNIOPoolEntry> lease(HttpHost route, Object state, FutureCallback<BasicNIOPoolEntry> callback)
           
protected  SocketAddress resolveLocalAddress(HttpHost host)
           
protected  SocketAddress resolveRemoteAddress(HttpHost host)
           
 
Methods inherited from class org.apache.http.nio.pool.AbstractNIOConnPool
closeExpired, closeIdle, getStats, getTotalStats, isShutdown, lease, release, requestCancelled, requestCompleted, requestFailed, requestTimeout, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal, shutdown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicNIOConnPool

public BasicNIOConnPool(ConnectingIOReactor ioreactor,
                        HttpParams params)
Method Detail

resolveRemoteAddress

protected SocketAddress resolveRemoteAddress(HttpHost host)
Specified by:
resolveRemoteAddress in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

resolveLocalAddress

protected SocketAddress resolveLocalAddress(HttpHost host)
Specified by:
resolveLocalAddress in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

createConnection

protected IOSession createConnection(HttpHost route,
                                     IOSession session)
Specified by:
createConnection in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

createEntry

protected BasicNIOPoolEntry createEntry(HttpHost host,
                                        IOSession conn)
Specified by:
createEntry in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

closeEntry

protected void closeEntry(BasicNIOPoolEntry entry)
Specified by:
closeEntry in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

lease

public Future<BasicNIOPoolEntry> lease(HttpHost route,
                                       Object state,
                                       FutureCallback<BasicNIOPoolEntry> callback)
Overrides:
lease in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>

lease

public Future<BasicNIOPoolEntry> lease(HttpHost route,
                                       Object state)
Overrides:
lease in class AbstractNIOConnPool<HttpHost,IOSession,BasicNIOPoolEntry>


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