Apache CXF API

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
 List<String> getAlternateAddresses(Exchange exchange)
          Get the alternate addresses for this invocation.
 List<Endpoint> getAlternateEndpoints(Exchange exchange)
          Get the alternate endpoints for this invocation.
 String selectAlternateAddress(List<String> addresses)
          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.
 

Method Detail

getAlternateEndpoints

List<Endpoint> getAlternateEndpoints(Exchange exchange)
Get the alternate endpoints for this invocation.

Parameters:
exchange - the current Exchange
Returns:
a failover endpoint if one is available

selectAlternateEndpoint

Endpoint selectAlternateEndpoint(List<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

List<String> getAlternateAddresses(Exchange exchange)
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

String selectAlternateAddress(List<String> addresses)
Select one of the alternate addresses for a retried invocation.

Parameters:
addresses - List of alternate addresses if available
Returns:
the selected address

Apache CXF API

Apache CXF