public interface LoadBalancingHandler
LoadBalancingHandler implementations must be thread-safe; that is, multiple threads may be running through a single instance of the implementation at any one time.
A LoadBalancingHandler instance is scoped to the Site to which the
LoadBalancingStrategy is assigned, and a single
instance is created for each assignment of a
LoadBalancingStrategy to a Site,
EntityScopedHandlerPlugin.getHandler() method. This constraint also implies
that a single LoadBalancingHandler instance will only ever see
TargetHosts for a single Site.
Any server-side state for a
LoadBalancingStrategy should be stored as members of the LoadBalancingHandler implementation
because a LoadBalancingHandler instance may persist across changes in the associated
This behavior is controlled by the
method. This functionality facilitates the storage of server-side state that persists across changes in the configuration
such as the addition of new
TargetHosts to a Site or changes to the
A LoadBalancingHandler is guaranteed to process an exchange after both Rules and
SiteAuthenticators have processed
|Modifier and Type||Method and Description|
Calculate the target host, given the list of available hosts and the current exchange.
Updates any internal data based on the response and optionally updates the response.
TargetHost calculateTargetHost(Exchange exchange, List<TargetHost> availableHosts, List<TargetHost> configuredHosts)
TargetHostis detected as unavailable after it is selected. To store data in between invocations, use the
exchange- The exchange.
availableHosts- The list of available hosts for a Site. This list cannot be modified by implementations.
configuredHosts- The list of configured hosts for a Site. This can be used to determine which hosts for the Site are available and perform any necessary cleanup for this case. This list cannot be modified by implementations.
void handleResponse(Exchange exchange, TargetHost targetHost)
exchange- The exchange containing the response.
targetHost- The target host used for the request.
Copyright 2019 Ping Identity Corp. All rights reserved.