public abstract class AbstractStaticFailoverStrategy extends Object implements FailoverStrategy
Constructor and Description |
---|
AbstractStaticFailoverStrategy() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAlternateAddresses(Exchange exchange)
Get the alternate addresses for this invocation.
|
List<Endpoint> |
getAlternateEndpoints(Exchange exchange)
Get the alternate endpoints for this invocation.
|
long |
getDelayBetweenRetries() |
protected List<Endpoint> |
getEndpoints(Exchange exchange,
boolean acceptCandidatesWithSameAddress)
Get the endpoints for this invocation.
|
protected Level |
getLogLevel()
Get the log level for reporting the selection of the new alternative address or endpoint
|
protected abstract <T> T |
getNextAlternate(List<T> alternates)
Get next alternate endpoint.
|
String |
selectAlternateAddress(List<String> alternates)
Select one of the alternate addresses for a retried invocation.
|
Endpoint |
selectAlternateEndpoint(List<Endpoint> alternates)
Select one of the alternate endpoints for a retried invocation.
|
void |
setAlternateAddresses(List<String> alternateAddresses) |
void |
setDelayBetweenRetries(long delay) |
public void setDelayBetweenRetries(long delay)
public long getDelayBetweenRetries()
public List<String> getAlternateAddresses(Exchange exchange)
getAlternateAddresses
in interface FailoverStrategy
exchange
- the current Exchangepublic String selectAlternateAddress(List<String> alternates)
selectAlternateAddress
in interface FailoverStrategy
alternates
- a List of alternate addresses if availablepublic List<Endpoint> getAlternateEndpoints(Exchange exchange)
getAlternateEndpoints
in interface FailoverStrategy
exchange
- the current Exchangepublic Endpoint selectAlternateEndpoint(List<Endpoint> alternates)
selectAlternateEndpoint
in interface FailoverStrategy
alternates
- a List of alternate endpoints if availableprotected List<Endpoint> getEndpoints(Exchange exchange, boolean acceptCandidatesWithSameAddress)
exchange
- the current ExchangeacceptCandidatesWithSameAddress
- true to accept candidates with the same addressprotected abstract <T> T getNextAlternate(List<T> alternates)
alternates
- non-empty List of alternate endpointsprotected Level getLogLevel()
Apache CXF