public class LoadDistributorTargetSelector extends FailoverTargetSelector
FailoverTargetSelector.InvocationContext
failoverStrategy
CONDUIT_COMPARE_FULL_URL, conduits, endpoint, KEEP_CONDUIT_ALIVE
Constructor and Description |
---|
LoadDistributorTargetSelector()
Normal constructor.
|
LoadDistributorTargetSelector(Conduit c)
Constructor, allowing a specific conduit to override normal selection.
|
LoadDistributorTargetSelector(String clientBootstrapAddress) |
Modifier and Type | Method and Description |
---|---|
protected Endpoint |
getFailoverTarget(Exchange exchange,
FailoverTargetSelector.InvocationContext invocation)
Get the failover target endpoint, if a suitable one is available.
|
protected Logger |
getLogger() |
boolean |
isFailover() |
protected boolean |
requiresFailover(Exchange exchange,
Exception ex)
Check if the exchange is suitable for a failover.
|
Conduit |
selectConduit(Message message)
Called when a Conduit is actually required.
|
void |
setFailover(boolean failover) |
complete, doComplete, getClientBootstrapAddress, getDelayBetweenRetries, getInvocationContext, getInvocationKey, getStrategy, isSupportNotAvailableErrorsOnly, onFailure, onSuccess, overrideAddressProperty, overrideAddressProperty, performFailover, prepare, replaceEndpointAddressPropertyIfNeeded, setClientBootstrapAddress, setOriginalEndpoint, setStrategy, setSupportNotAvailableErrorsOnly, setupExchangeExceptionProperties, updateContextAlternatives
close, createConduit, findCompatibleConduit, getEndpoint, getSelectedConduit, removeConduit, setEndpoint
public LoadDistributorTargetSelector()
public LoadDistributorTargetSelector(String clientBootstrapAddress)
public LoadDistributorTargetSelector(Conduit c)
c
- specific conduitpublic boolean isFailover()
public void setFailover(boolean failover)
protected Logger getLogger()
getLogger
in class FailoverTargetSelector
public Conduit selectConduit(Message message)
selectConduit
in interface ConduitSelector
selectConduit
in class FailoverTargetSelector
message
- protected Endpoint getFailoverTarget(Exchange exchange, FailoverTargetSelector.InvocationContext invocation)
getFailoverTarget
in class FailoverTargetSelector
exchange
- the current Exchangeinvocation
- the current InvocationContextprotected boolean requiresFailover(Exchange exchange, Exception ex)
FailoverTargetSelector
requiresFailover
in class FailoverTargetSelector
exchange
- the current ExchangeApache CXF