Package org.wildfly.httpclient.common
Class HttpConnectionPool
- java.lang.Object
-
- org.wildfly.httpclient.common.HttpConnectionPool
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class HttpConnectionPool extends java.lang.Object implements java.io.CloseableA 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, java.net.URI uri, javax.net.ssl.SSLContext sslContext)voidgetConnection(HttpConnectionPool.ConnectionListener connectionListener, HttpConnectionPool.ErrorListener errorListener, boolean ignoreConnectionLimits, javax.net.ssl.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, javax.net.ssl.SSLContext sslContext)
-
returnConnection
public void returnConnection(HttpConnectionPool.ClientConnectionHolder connection)
-
createClientConnectionHolder
protected HttpConnectionPool.ClientConnectionHolder createClientConnectionHolder(io.undertow.client.ClientConnection connection, java.net.URI uri, javax.net.ssl.SSLContext sslContext)
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-