org.apache.http.impl.nio.conn
Class PoolingAsyncClientConnectionManager
java.lang.Object
org.apache.http.impl.nio.conn.PoolingAsyncClientConnectionManager
- All Implemented Interfaces:
- ClientAsyncConnectionManager, org.apache.http.nio.reactor.IOReactor, org.apache.http.pool.ConnPoolControl<HttpRoute>
public class PoolingAsyncClientConnectionManager
- extends Object
- implements ClientAsyncConnectionManager, org.apache.http.pool.ConnPoolControl<HttpRoute>
PoolingAsyncClientConnectionManager
public PoolingAsyncClientConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor,
AsyncSchemeRegistry schemeRegistry,
long timeToLive,
TimeUnit tunit)
PoolingAsyncClientConnectionManager
public PoolingAsyncClientConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor,
AsyncSchemeRegistry schemeRegistry)
throws org.apache.http.nio.reactor.IOReactorException
- Throws:
org.apache.http.nio.reactor.IOReactorException
PoolingAsyncClientConnectionManager
public PoolingAsyncClientConnectionManager(org.apache.http.nio.reactor.ConnectingIOReactor ioreactor)
throws org.apache.http.nio.reactor.IOReactorException
- Throws:
org.apache.http.nio.reactor.IOReactorException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
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<ManagedAsyncClientConnection> leaseConnection(HttpRoute route,
Object state,
long connectTimeout,
TimeUnit tunit,
org.apache.http.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)
- Specified by:
leaseConnection
in interface ClientAsyncConnectionManager
releaseConnection
public void releaseConnection(ManagedAsyncClientConnection 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<HttpRoute>
getStats
public org.apache.http.pool.PoolStats getStats(HttpRoute route)
- Specified by:
getStats
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
setTotalMax
@Deprecated
public void setTotalMax(int max)
- Deprecated.
setMaxTotal
public void setMaxTotal(int max)
- Specified by:
setMaxTotal
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
setDefaultMaxPerHost
@Deprecated
public void setDefaultMaxPerHost(int max)
- Deprecated.
setDefaultMaxPerRoute
public void setDefaultMaxPerRoute(int max)
- Specified by:
setDefaultMaxPerRoute
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
setMaxPerHost
@Deprecated
public void setMaxPerHost(HttpRoute route,
int max)
- Deprecated.
setMaxPerRoute
public void setMaxPerRoute(HttpRoute route,
int max)
- Specified by:
setMaxPerRoute
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
getMaxTotal
public int getMaxTotal()
- Specified by:
getMaxTotal
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
getDefaultMaxPerRoute
public int getDefaultMaxPerRoute()
- Specified by:
getDefaultMaxPerRoute
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
getMaxPerRoute
public int getMaxPerRoute(HttpRoute route)
- Specified by:
getMaxPerRoute
in interface org.apache.http.pool.ConnPoolControl<HttpRoute>
closeIdleConnections
public void closeIdleConnections(long idleTimeout,
TimeUnit tunit)
closeExpiredConnections
public void closeExpiredConnections()
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.