Class MessagingOperationFailedException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SendBatchOperationFailedException

public class MessagingOperationFailedException extends NestedRuntimeException
Exception to represent the failure of a Messaging Operation.
Since:
3.0
Author:
Tomaz Fernandes
See Also:
  • Constructor Details

    • MessagingOperationFailedException

      public MessagingOperationFailedException(String msg, String endpoint)
      Create an instance with the provided error message.
      Parameters:
      msg - the message.
    • MessagingOperationFailedException

      public MessagingOperationFailedException(String msg, String endpoint, @Nullable Throwable cause)
      Create an instance with the provided error message and cause, if any.
      Parameters:
      msg - the error message.
      cause - the cause.
    • MessagingOperationFailedException

      public MessagingOperationFailedException(String msg, String endpoint, Message<?> message, @Nullable Throwable cause)
      Create an instance with the provided parameters and a single message.
      Parameters:
      msg - the error message.
      endpoint - the endpoint with which the operation failed.
      message - the message with which the operation failed.
      cause - the cause.
    • MessagingOperationFailedException

      public MessagingOperationFailedException(String msg, String endpoint, Collection<Message<T>> messages, @Nullable Throwable cause)
      Create an instance with the provided parameters and a batch of messages.
      Parameters:
      msg - the error message.
      endpoint - the endpoint with which the operation failed.
      messages - the messages with which the operation failed.
      cause - the cause.
  • Method Details

    • getEndpoint

      public String getEndpoint()
      Get the endpoint which the operation failed.
      Returns:
      the endpoint.
    • getFailedMessages

      public Collection<Message<?>> getFailedMessages()
      The failed messages.
      Returns:
      the messages.
    • getFailedMessage

      public Optional<Message<?>> getFailedMessage()
      A single failed message, if present.
      Returns:
      the message if present.