Package org.apache.cxf.clustering
Interface FailoverStrategy
- All Known Implementing Classes:
AbstractStaticFailoverStrategy,RandomStrategy,RetryStrategy,SequentialStrategy
public interface FailoverStrategy
Supports pluggable strategies for alternate endpoint selection on
failover.
-
Method Summary
Modifier and TypeMethodDescriptiongetAlternateAddresses(org.apache.cxf.message.Exchange exchange) Get the alternate addresses for this invocation.List<org.apache.cxf.endpoint.Endpoint>getAlternateEndpoints(org.apache.cxf.message.Exchange exchange) Get the alternate endpoints for this invocation.selectAlternateAddress(List<String> addresses) Select one of the alternate addresses for a retried invocation.org.apache.cxf.endpoint.EndpointselectAlternateEndpoint(List<org.apache.cxf.endpoint.Endpoint> alternates) Select one of the alternate endpoints for a retried invocation.
-
Method Details
-
getAlternateEndpoints
List<org.apache.cxf.endpoint.Endpoint> getAlternateEndpoints(org.apache.cxf.message.Exchange exchange) Get the alternate endpoints for this invocation.- Parameters:
exchange- the current Exchange- Returns:
- a failover endpoint if one is available
-
selectAlternateEndpoint
org.apache.cxf.endpoint.Endpoint selectAlternateEndpoint(List<org.apache.cxf.endpoint.Endpoint> alternates) Select one of the alternate endpoints for a retried invocation.- Parameters:
alternates- List of alternate endpoints if available- Returns:
- the selected endpoint
-
getAlternateAddresses
Get the alternate addresses for this invocation. These addresses over-ride any addresses specified in the WSDL.- Parameters:
exchange- the current Exchange- Returns:
- a failover endpoint if one is available
-
selectAlternateAddress
Select one of the alternate addresses for a retried invocation.- Parameters:
addresses- List of alternate addresses if available- Returns:
- the selected address
-