Interface ErrorCollector<T>


public interface ErrorCollector<T>
An interface for accepting modified information to be retried in the event of a recoverable failure.
  • Method Summary

    Modifier and Type
    Method
    Description
    pass(String reason)
    Signal that a failure could not be handled by this handler and pass the record on to the next handler.
    Retry an operation using the same data from the previous operation.
    retry(T retryData)
    Retry an operation using the given retry data
  • Method Details

    • retry

      HandlerResult retry()
      Retry an operation using the same data from the previous operation.
      Returns:
      Appropriate handler result value stating the failure has been retried. In most cases this is HandlerResult.HANDLED but can vary depending on the use case.
    • retry

      HandlerResult retry(T retryData)
      Retry an operation using the given retry data
      Parameters:
      retryData - operation/data to retry
      Returns:
      Appropriate handler result value stating the failure has been retried. In most cases this is HandlerResult.HANDLED but can vary depending on the use case.
    • pass

      HandlerResult pass(String reason)
      Signal that a failure could not be handled by this handler and pass the record on to the next handler. An optional string can be provided explaining the reason for passing on handling the error.
      Parameters:
      reason - optional reason for passing on data. Reasons are used in the final report if an error could not be handled.
      Returns:
      Appropriate handler result value stating the failure should be passed on to the next handler. In most cases this is HandlerResult.PASS but can vary depending on the use case.