Class ProxyConnectionPool
- java.lang.Object
-
- io.undertow.server.handlers.proxy.ProxyConnectionPool
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ProxyConnectionPool extends Object implements Closeable
A pool of connections to a target host. This pool can also be used to open connections in exclusive mode, in which case they will not be added to the connection pool. In this case the caller is responsible for closing any connections.- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProxyConnectionPool.AvailabilityType
-
Constructor Summary
Constructors Constructor Description ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, InetSocketAddress bindAddress, URI uri, UndertowClient client, org.xnio.OptionMap options)
ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, InetSocketAddress bindAddress, URI uri, org.xnio.ssl.XnioSsl ssl, UndertowClient client, org.xnio.OptionMap options)
ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, URI uri, UndertowClient client, org.xnio.OptionMap options)
ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, URI uri, org.xnio.ssl.XnioSsl ssl, UndertowClient client, org.xnio.OptionMap options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProxyConnectionPool.AvailabilityType
available()
void
close()
void
connect(ProxyClient.ProxyTarget proxyTarget, HttpServerExchange exchange, ProxyCallback<ProxyConnection> callback, long timeout, TimeUnit timeUnit, boolean exclusive)
InetSocketAddress
getBindAddress()
ClientStatistics
getClientStatistics()
int
getOpenConnections()
URI
getUri()
-
-
-
Constructor Detail
-
ProxyConnectionPool
public ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, URI uri, UndertowClient client, org.xnio.OptionMap options)
-
ProxyConnectionPool
public ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, InetSocketAddress bindAddress, URI uri, UndertowClient client, org.xnio.OptionMap options)
-
ProxyConnectionPool
public ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, URI uri, org.xnio.ssl.XnioSsl ssl, UndertowClient client, org.xnio.OptionMap options)
-
ProxyConnectionPool
public ProxyConnectionPool(ConnectionPoolManager connectionPoolManager, InetSocketAddress bindAddress, URI uri, org.xnio.ssl.XnioSsl ssl, UndertowClient client, org.xnio.OptionMap options)
-
-
Method Detail
-
getUri
public URI getUri()
-
getBindAddress
public InetSocketAddress getBindAddress()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
available
public ProxyConnectionPool.AvailabilityType available()
-
getClientStatistics
public ClientStatistics getClientStatistics()
-
getOpenConnections
public int getOpenConnections()
- Returns:
- The total number of open connections
-
connect
public void connect(ProxyClient.ProxyTarget proxyTarget, HttpServerExchange exchange, ProxyCallback<ProxyConnection> callback, long timeout, TimeUnit timeUnit, boolean exclusive)
- Parameters:
exclusive
- - Is connection for the exclusive use of one client?
-
-