Package com.azure.core.amqp.models
Class RejectedDeliveryOutcome
- java.lang.Object
-
- com.azure.core.amqp.models.DeliveryOutcome
-
- com.azure.core.amqp.models.RejectedDeliveryOutcome
-
public final class RejectedDeliveryOutcome extends DeliveryOutcome
The rejected delivery outcome.At the target, the rejected outcome is used to indicate that an incoming message is invalid and therefore unprocessable. The rejected outcome when applied to a message will cause the delivery-count to be incremented in the header of the rejected message.
At the source, the rejected outcome means that the target has informed the source that the message was rejected, and the source has taken the necessary action. The delivery SHOULD NOT ever spontaneously attain the rejected state at the source.
- See Also:
- Rejected outcome
-
-
Constructor Summary
Constructors Constructor Description RejectedDeliveryOutcome(AmqpErrorCondition errorCondition)Creates an instance with the given error condition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmqpErrorConditiongetErrorCondition()Diagnostic information about the cause of the message rejection.StringgetErrorDescription()Gets the error description.Map<String,Object>getErrorInfo()Gets a map of additional error information.RejectedDeliveryOutcomesetErrorInfo(Map<String,Object> errorInfo)Sets a map with additional error information.-
Methods inherited from class com.azure.core.amqp.models.DeliveryOutcome
getDeliveryState
-
-
-
-
Constructor Detail
-
RejectedDeliveryOutcome
public RejectedDeliveryOutcome(AmqpErrorCondition errorCondition)
Creates an instance with the given error condition.- Parameters:
errorCondition- The error condition.
-
-
Method Detail
-
getErrorCondition
public AmqpErrorCondition getErrorCondition()
Diagnostic information about the cause of the message rejection.- Returns:
- Diagnostic information about the cause of the message rejection.
-
getErrorDescription
public String getErrorDescription()
Gets the error description.- Returns:
- Gets the error condition.
-
getErrorInfo
public Map<String,Object> getErrorInfo()
Gets a map of additional error information.- Returns:
- Map of additional error information.
-
setErrorInfo
public RejectedDeliveryOutcome setErrorInfo(Map<String,Object> errorInfo)
Sets a map with additional error information.- Parameters:
errorInfo- Error information associated with the rejection.- Returns:
- The updated
RejectedDeliveryOutcomeobject.
-
-