Class ProxyConnectionPool
java.lang.Object
io.undertow.server.handlers.proxy.ProxyConnectionPool
- All Implemented Interfaces:
Closeable
,AutoCloseable
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 -
Constructor Summary
ConstructorsConstructorDescriptionProxyConnectionPool
(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
Modifier and TypeMethodDescriptionvoid
close()
void
connect
(ProxyClient.ProxyTarget proxyTarget, HttpServerExchange exchange, ProxyCallback<ProxyConnection> callback, long timeout, TimeUnit timeUnit, boolean exclusive) int
getUri()
-
Constructor Details
-
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 Details
-
getUri
-
getBindAddress
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
available
-
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?
-