org.apache.http.impl.nio.conn
Class PoolingClientAsyncConnectionManager

java.lang.Object
  extended by org.apache.http.impl.nio.conn.PoolingClientAsyncConnectionManager
All Implemented Interfaces:
ClientAsyncConnectionManager, org.apache.http.nio.reactor.IOReactor, org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

public class PoolingClientAsyncConnectionManager
extends Object
implements ClientAsyncConnectionManager, org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>


Constructor Summary
PoolingClientAsyncConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor)
           
PoolingClientAsyncConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor, AsyncSchemeRegistry schemeRegistry)
           
PoolingClientAsyncConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor, AsyncSchemeRegistry schemeRegistry, long timeToLive, TimeUnit tunit)
           
 
Method Summary
 void closeExpiredConnections()
           
 void closeIdleConnections(long idleTimeout, TimeUnit tunit)
           
protected  ClientAsyncConnectionFactory createClientAsyncConnectionFactory()
           
 void execute(org.apache.http.nio.reactor.IOEventDispatch eventDispatch)
           
protected  void finalize()
           
 int getDefaultMaxPerRoute()
           
 int getMaxPerRoute(org.apache.http.conn.routing.HttpRoute route)
           
 int getMaxTotal()
           
 AsyncSchemeRegistry getSchemeRegistry()
           
 org.apache.http.pool.PoolStats getStats(org.apache.http.conn.routing.HttpRoute route)
           
 org.apache.http.nio.reactor.IOReactorStatus getStatus()
           
 org.apache.http.pool.PoolStats getTotalStats()
           
 Future<ManagedClientAsyncConnection> leaseConnection(org.apache.http.conn.routing.HttpRoute route, Object state, long connectTimeout, TimeUnit tunit, org.apache.http.concurrent.FutureCallback<ManagedClientAsyncConnection> callback)
           
 void releaseConnection(ManagedClientAsyncConnection conn, long keepalive, TimeUnit tunit)
           
 void setDefaultMaxPerRoute(int max)
           
 void setMaxPerRoute(org.apache.http.conn.routing.HttpRoute route, int max)
           
 void setMaxTotal(int max)
           
 void shutdown()
           
 void shutdown(long waitMs)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolingClientAsyncConnectionManager

public PoolingClientAsyncConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor,
                                           AsyncSchemeRegistry schemeRegistry,
                                           long timeToLive,
                                           TimeUnit tunit)

PoolingClientAsyncConnectionManager

public PoolingClientAsyncConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor,
                                           AsyncSchemeRegistry schemeRegistry)
                                    throws org.apache.http.nio.reactor.IOReactorException
Throws:
org.apache.http.nio.reactor.IOReactorException

PoolingClientAsyncConnectionManager

public PoolingClientAsyncConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor)
                                    throws org.apache.http.nio.reactor.IOReactorException
Throws:
org.apache.http.nio.reactor.IOReactorException
Method Detail

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

createClientAsyncConnectionFactory

protected ClientAsyncConnectionFactory createClientAsyncConnectionFactory()

getSchemeRegistry

public AsyncSchemeRegistry getSchemeRegistry()
Specified by:
getSchemeRegistry in interface ClientAsyncConnectionManager

execute

public void execute(org.apache.http.nio.reactor.IOEventDispatch eventDispatch)
             throws IOException
Specified by:
execute in interface org.apache.http.nio.reactor.IOReactor
Throws:
IOException

getStatus

public org.apache.http.nio.reactor.IOReactorStatus getStatus()
Specified by:
getStatus in interface org.apache.http.nio.reactor.IOReactor

shutdown

public void shutdown(long waitMs)
              throws IOException
Specified by:
shutdown in interface org.apache.http.nio.reactor.IOReactor
Throws:
IOException

shutdown

public void shutdown()
              throws IOException
Specified by:
shutdown in interface org.apache.http.nio.reactor.IOReactor
Throws:
IOException

leaseConnection

public Future<ManagedClientAsyncConnection> leaseConnection(org.apache.http.conn.routing.HttpRoute route,
                                                            Object state,
                                                            long connectTimeout,
                                                            TimeUnit tunit,
                                                            org.apache.http.concurrent.FutureCallback<ManagedClientAsyncConnection> callback)
Specified by:
leaseConnection in interface ClientAsyncConnectionManager

releaseConnection

public void releaseConnection(ManagedClientAsyncConnection conn,
                              long keepalive,
                              TimeUnit tunit)
Specified by:
releaseConnection in interface ClientAsyncConnectionManager

getTotalStats

public org.apache.http.pool.PoolStats getTotalStats()
Specified by:
getTotalStats in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

getStats

public org.apache.http.pool.PoolStats getStats(org.apache.http.conn.routing.HttpRoute route)
Specified by:
getStats in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

setMaxTotal

public void setMaxTotal(int max)
Specified by:
setMaxTotal in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

setDefaultMaxPerRoute

public void setDefaultMaxPerRoute(int max)
Specified by:
setDefaultMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

setMaxPerRoute

public void setMaxPerRoute(org.apache.http.conn.routing.HttpRoute route,
                           int max)
Specified by:
setMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

getMaxTotal

public int getMaxTotal()
Specified by:
getMaxTotal in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

getDefaultMaxPerRoute

public int getDefaultMaxPerRoute()
Specified by:
getDefaultMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

getMaxPerRoute

public int getMaxPerRoute(org.apache.http.conn.routing.HttpRoute route)
Specified by:
getMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

closeIdleConnections

public void closeIdleConnections(long idleTimeout,
                                 TimeUnit tunit)

closeExpiredConnections

public void closeExpiredConnections()


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.