Package org.wildfly.httpclient.common
Class HttpConnectionPool
- java.lang.Object
-
- org.wildfly.httpclient.common.HttpConnectionPool
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class HttpConnectionPool extends Object implements Closeable
A pool of HTTP connections for a given host pool.- Author:
- Stuart Douglas, Flavia Rainone
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classHttpConnectionPool.ClientConnectionHolderstatic interfaceHttpConnectionPool.ConnectionHandlestatic interfaceHttpConnectionPool.ConnectionListenerstatic interfaceHttpConnectionPool.ErrorListener
-
Constructor Summary
Constructors Constructor Description HttpConnectionPool(int maxConnections, int maxStreamsPerConnection, org.xnio.XnioWorker worker, io.undertow.connector.ByteBufferPool byteBufferPool, org.xnio.OptionMap options, HostPool hostPool, long connectionIdleTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected HttpConnectionPool.ClientConnectionHoldercreateClientConnectionHolder(io.undertow.client.ClientConnection connection, URI uri, SSLContext sslContext)voidgetConnection(HttpConnectionPool.ConnectionListener connectionListener, HttpConnectionPool.ErrorListener errorListener, boolean ignoreConnectionLimits, SSLContext sslContext)voidreturnConnection(HttpConnectionPool.ClientConnectionHolder connection)
-
-
-
Constructor Detail
-
HttpConnectionPool
public HttpConnectionPool(int maxConnections, int maxStreamsPerConnection, org.xnio.XnioWorker worker, io.undertow.connector.ByteBufferPool byteBufferPool, org.xnio.OptionMap options, HostPool hostPool, long connectionIdleTimeout)
-
-
Method Detail
-
getConnection
public void getConnection(HttpConnectionPool.ConnectionListener connectionListener, HttpConnectionPool.ErrorListener errorListener, boolean ignoreConnectionLimits, SSLContext sslContext)
-
returnConnection
public void returnConnection(HttpConnectionPool.ClientConnectionHolder connection)
-
createClientConnectionHolder
protected HttpConnectionPool.ClientConnectionHolder createClientConnectionHolder(io.undertow.client.ClientConnection connection, URI uri, SSLContext sslContext)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-