Class BatchDeliveryException

All Implemented Interfaces:
Serializable

public final class BatchDeliveryException extends MessagingException
Structured partial or indeterminate batch delivery failure.
See Also:
  • Constructor Details

    • BatchDeliveryException

      public BatchDeliveryException(String message, Throwable cause, MessageBatch<?> batch, List<BatchItemOutcome> outcomes)
      Create a structured batch failure.
      Parameters:
      message - non-null failure message
      cause - non-null primary cause
      batch - non-null original batch
      outcomes - non-null ordered outcome for every original item
      Throws:
      NullPointerException - if any argument or outcome is null
      IllegalArgumentException - if the outcomes do not align with the batch, or every outcome succeeded
  • Method Details

    • batch

      public MessageBatch<?> batch()
      Original batch.
      Returns:
      batch
    • outcomes

      public List<BatchItemOutcome> outcomes()
      Ordered item outcomes.
      Returns:
      outcomes
    • outcome

      public BatchItemOutcome outcome(int index)
      Outcome for one original batch index.
      Parameters:
      index - item index
      Returns:
      outcome