Package io.awspring.cloud.sqs.operations
Class MessagingOperationFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
io.awspring.cloud.sqs.operations.MessagingOperationFailedException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SendBatchOperationFailedException
Exception to represent the failure of a Messaging Operation.
- Since:
- 3.0
- Author:
- Tomaz Fernandes
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMessagingOperationFailedException
(String msg, String endpoint) Create an instance with the provided error message.MessagingOperationFailedException
(String msg, String endpoint, Throwable cause) Create an instance with the provided error message and cause, if any.MessagingOperationFailedException
(String msg, String endpoint, Collection<Message<T>> messages, Throwable cause) Create an instance with the provided parameters and a batch of messages.MessagingOperationFailedException
(String msg, String endpoint, Message<?> message, Throwable cause) Create an instance with the provided parameters and a single message. -
Method Summary
Modifier and TypeMethodDescriptionGet the endpoint which the operation failed.A single failed message, if present.Collection<Message<?>>
The failed messages.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MessagingOperationFailedException
Create an instance with the provided error message.- Parameters:
msg
- the message.
-
MessagingOperationFailedException
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
Get the endpoint which the operation failed.- Returns:
- the endpoint.
-
getFailedMessages
The failed messages.- Returns:
- the messages.
-
getFailedMessage
A single failed message, if present.- Returns:
- the message if present.
-