Top Description Inners Methods
io.undertow.server.handlers.proxy

public Interface ProxyClient

Known Direct Implementers
io.undertow.server.handlers.proxy.SimpleProxyClientProvider, io.undertow.server.handlers.proxy.mod_cluster.ModClusterProxyClient, io.undertow.server.handlers.proxy.LoadBalancingProxyClient
Imports
io.undertow.server.HttpServerExchange, io.undertow.server.handlers.proxy.LoadBalancingProxyClient.Host, java.util.ArrayList, .List, java.util.concurrent.TimeUnit

A client that provides connections for the proxy handler. The provided connection is valid for the duration of the current exchange. Note that implementation are required to manage the lifecycle of these connections themselves, generally by registering callbacks on the exchange.
Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static interface
public static interface
ProxyClient.ProxyTarget

An opaque interface that may contain information about the proxy target

Method Summary

Modifier and TypeMethod and Description
public ProxyClient.ProxyTarget

Returns:

The proxy target
findTarget
(final HttpServerExchange
The exchange
exchange
)

Finds a proxy target for this request, returning null if none can be found.

public default List<ProxyClient.ProxyTarget>
public void
getConnection(final ProxyClient.ProxyTarget target, final HttpServerExchange
The exchange
exchange
,
final ProxyCallback<ProxyConnection>
The callback
callback
,
long
The timeout
timeout
,
TimeUnit
Time unit for the timeout
timeUnit
)

Gets a proxy connection for the given request.

Method Detail

findTargetback to summary
public ProxyClient.ProxyTarget findTarget(final HttpServerExchange exchange)

Finds a proxy target for this request, returning null if none can be found. If this method returns null it means that there is no backend available to handle this request, and it should proceed as normal.

Parameters
exchange:HttpServerExchange

The exchange

Returns:ProxyClient.ProxyTarget

The proxy target

getAllTargetsback to summary
public default List<ProxyClient.ProxyTarget> getAllTargets()
getConnectionback to summary
public void getConnection(final ProxyClient.ProxyTarget target, final HttpServerExchange exchange, final ProxyCallback<ProxyConnection> callback, long timeout, TimeUnit timeUnit)

Gets a proxy connection for the given request.

Parameters
exchange:HttpServerExchange

The exchange

callback:ProxyCallback<ProxyConnection>

The callback

timeout:long

The timeout

timeUnit:TimeUnit

Time unit for the timeout

io.undertow.server.handlers.proxy back to summary

public Interface ProxyClient.HostProxyTarget

extends ProxyTarget

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

setHostback to summary
public void setHost(LoadBalancingProxyClient.Host host)
io.undertow.server.handlers.proxy back to summary

public Interface ProxyClient.MaxRetriesProxyTarget

extends ProxyTarget
Known Direct Subinterfaces
io.undertow.server.handlers.proxy.mod_cluster.ModClusterProxyTarget

Method Summary

Modifier and TypeMethod and Description
public int

Method Detail

getMaxRetriesback to summary
public int getMaxRetries()
io.undertow.server.handlers.proxy back to summary

public Interface ProxyClient.ProxyTarget

Known Direct Subinterfaces
io.undertow.server.handlers.proxy.ProxyClient.MaxRetriesProxyTarget, io.undertow.server.handlers.proxy.ProxyClient.HostProxyTarget, io.undertow.server.handlers.proxy.mod_cluster.ModClusterProxyTarget

An opaque interface that may contain information about the proxy target