Top Inners Fields Constructors Methods
io.undertow.server.handlers.proxy.mod_cluster

pack-priv Class ModClusterProxyClient

extends Object
implements ProxyClient
Class Inheritance
All Implemented Interfaces
io.undertow.server.handlers.proxy.ProxyClient
Static Imports
org.xnio.IoUtils.safeClose

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ModClusterContainer
private final AttachmentKey<ModClusterProxyClient.ExclusiveConnectionHolder>
exclusiveConnectionKey

The attachment key that is used to attach the proxy connection to the exchange.

private final ExclusivityChecker

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public ProxyClient.ProxyTarget
findTarget(HttpServerExchange
The exchange
exchange
)

Implements io.undertow.server.handlers.proxy.ProxyClient.findTarget.

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

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

Implements io.undertow.server.handlers.proxy.ProxyClient.getConnection.

Gets a proxy connection for the given request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containerback to summary
private final ModClusterContainer container
exclusiveConnectionKeyback to summary
private final AttachmentKey<ModClusterProxyClient.ExclusiveConnectionHolder> exclusiveConnectionKey

The attachment key that is used to attach the proxy connection to the exchange.

This cannot be static as otherwise a connection from a different client could be re-used.

exclusivityCheckerback to summary
private final ExclusivityChecker exclusivityChecker

Constructor Detail

ModClusterProxyClientback to summary
protected ModClusterProxyClient(ExclusivityChecker exclusivityChecker, ModClusterContainer container)

Method Detail

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

Implements io.undertow.server.handlers.proxy.ProxyClient.findTarget.

Doc from io.undertow.server.handlers.proxy.ProxyClient.findTarget.

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

Annotations
@Override
getConnectionback to summary
public void getConnection(final ProxyClient.ProxyTarget target, final HttpServerExchange exchange, final ProxyCallback<ProxyConnection> callback, final long timeout, final TimeUnit timeUnit)

Implements io.undertow.server.handlers.proxy.ProxyClient.getConnection.

Doc from io.undertow.server.handlers.proxy.ProxyClient.getConnection.

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.mod_cluster back to summary

private Class ModClusterProxyClient.ExclusiveConnectionHolder

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.server.handlers.proxy.mod_cluster.ModClusterProxyClient.ExclusiveConnectionHolder

Field Summary

Modifier and TypeField and Description
private ProxyConnection

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionback to summary
private ProxyConnection connection

Constructor Detail

ExclusiveConnectionHolderback to summary
private ExclusiveConnectionHolder()