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

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

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

A very basic ConnPool implementation that represents a pool of non-blocking NHttpClientConnection 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
BasicNIOConnPool(ConnectingIOReactor ioreactor)
           
BasicNIOConnPool(ConnectingIOReactor ioreactor, ConnectionConfig config)
           
BasicNIOConnPool(ConnectingIOReactor ioreactor, HttpParams params)
          Deprecated. (4.3) use BasicNIOConnPool(ConnectingIOReactor, ConnectionConfig)
BasicNIOConnPool(ConnectingIOReactor ioreactor, int connectTimeout, ConnectionConfig config)
           
BasicNIOConnPool(ConnectingIOReactor ioreactor, NIOConnFactory<HttpHost,NHttpClientConnection> connFactory, HttpParams params)
          Deprecated. (4.3) use BasicNIOConnPool(ConnectingIOReactor, NIOConnFactory, int)
BasicNIOConnPool(ConnectingIOReactor ioreactor, NIOConnFactory<HttpHost,NHttpClientConnection> connFactory, int connectTimeout)
           
 
Method Summary
protected  BasicNIOPoolEntry createEntry(HttpHost host, NHttpClientConnection conn)
           
 Future<BasicNIOPoolEntry> lease(HttpHost route, Object state)
           
 Future<BasicNIOPoolEntry> lease(HttpHost route, Object state, FutureCallback<BasicNIOPoolEntry> callback)
           
protected  void onLease(BasicNIOPoolEntry entry)
           
protected  void onRelease(BasicNIOPoolEntry entry)
           
protected  SocketAddress resolveLocalAddress(HttpHost host)
          Deprecated. (4.3) use SocketAddressResolver
protected  SocketAddress resolveRemoteAddress(HttpHost host)
          Deprecated. (4.3) use SocketAddressResolver
 
Methods inherited from class org.apache.http.nio.pool.AbstractNIOConnPool
closeExpired, closeIdle, enumAvailable, enumEntries, enumLeased, getDefaultMaxPerRoute, getMaxPerRoute, getMaxTotal, getRoutes, getStats, getTotalStats, isShutdown, lease, lease, onReuse, release, requestCancelled, requestCompleted, requestFailed, requestTimeout, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal, shutdown, toString, validatePendingRequests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicNIOConnPool

@Deprecated
public BasicNIOConnPool(ConnectingIOReactor ioreactor,
                                   NIOConnFactory<HttpHost,NHttpClientConnection> connFactory,
                                   HttpParams params)
Deprecated. (4.3) use BasicNIOConnPool(ConnectingIOReactor, NIOConnFactory, int)


BasicNIOConnPool

@Deprecated
public BasicNIOConnPool(ConnectingIOReactor ioreactor,
                                   HttpParams params)
Deprecated. (4.3) use BasicNIOConnPool(ConnectingIOReactor, ConnectionConfig)


BasicNIOConnPool

public BasicNIOConnPool(ConnectingIOReactor ioreactor,
                        NIOConnFactory<HttpHost,NHttpClientConnection> connFactory,
                        int connectTimeout)
Since:
4.3

BasicNIOConnPool

public BasicNIOConnPool(ConnectingIOReactor ioreactor,
                        int connectTimeout,
                        ConnectionConfig config)
Since:
4.3

BasicNIOConnPool

public BasicNIOConnPool(ConnectingIOReactor ioreactor,
                        ConnectionConfig config)
Since:
4.3

BasicNIOConnPool

public BasicNIOConnPool(ConnectingIOReactor ioreactor)
Since:
4.3
Method Detail

resolveRemoteAddress

@Deprecated
protected SocketAddress resolveRemoteAddress(HttpHost host)
Deprecated. (4.3) use SocketAddressResolver

Overrides:
resolveRemoteAddress in class AbstractNIOConnPool<HttpHost,NHttpClientConnection,BasicNIOPoolEntry>

resolveLocalAddress

@Deprecated
protected SocketAddress resolveLocalAddress(HttpHost host)
Deprecated. (4.3) use SocketAddressResolver

Overrides:
resolveLocalAddress in class AbstractNIOConnPool<HttpHost,NHttpClientConnection,BasicNIOPoolEntry>

createEntry

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

lease

public Future<BasicNIOPoolEntry> lease(HttpHost route,
                                       Object state,
                                       FutureCallback<BasicNIOPoolEntry> callback)
Specified by:
lease in interface ConnPool<HttpHost,BasicNIOPoolEntry>
Overrides:
lease in class AbstractNIOConnPool<HttpHost,NHttpClientConnection,BasicNIOPoolEntry>

lease

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

onLease

protected void onLease(BasicNIOPoolEntry entry)
Overrides:
onLease in class AbstractNIOConnPool<HttpHost,NHttpClientConnection,BasicNIOPoolEntry>

onRelease

protected void onRelease(BasicNIOPoolEntry entry)
Overrides:
onRelease in class AbstractNIOConnPool<HttpHost,NHttpClientConnection,BasicNIOPoolEntry>


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