Class RetryStrategy

All Implemented Interfaces:
FailoverStrategy

public class RetryStrategy extends SequentialStrategy
This strategy simply retries the invocation using the same Endpoint (CXF-2036).
  • Constructor Details

    • RetryStrategy

      public RetryStrategy()
  • Method Details

    • getAlternateEndpoints

      public List<org.apache.cxf.endpoint.Endpoint> getAlternateEndpoints(org.apache.cxf.message.Exchange exchange)
      Description copied from class: AbstractStaticFailoverStrategy
      Get the alternate endpoints for this invocation.
      Specified by:
      getAlternateEndpoints in interface FailoverStrategy
      Overrides:
      getAlternateEndpoints in class AbstractStaticFailoverStrategy
      Parameters:
      exchange - the current Exchange
      Returns:
      a List of alternate endpoints if available
    • getNextAlternate

      protected <T> T getNextAlternate(List<T> alternates)
      Description copied from class: SequentialStrategy
      Get next alternate endpoint.
      Overrides:
      getNextAlternate in class SequentialStrategy
      Parameters:
      alternates - non-empty List of alternate endpoints
      Returns:
      the next endpoint or null in case there are no more alternates
    • stillTheSameAddress

      protected boolean stillTheSameAddress()
    • setMaxNumberOfRetries

      public void setMaxNumberOfRetries(int maxNumberOfRetries)
    • getMaxNumberOfRetries

      public int getMaxNumberOfRetries()