Class DeliveryException

  • All Implemented Interfaces:
    Serializable

    public class DeliveryException
    extends Exception
    Provides a submission delivery exception which can specify the error handling behaviour.
    See Also:
    Serialized Form
    • Constructor Detail

      • DeliveryException

        public DeliveryException​(String message)
        Create a critical delivery exception with the given message. The submission delivery job should not attempt to deliver submissions using the same delivery service.
        Parameters:
        message - the error message
      • DeliveryException

        public DeliveryException​(String message,
                                 Throwable cause)
        Create a critical delivery exception with the given message and cause. The submission delivery job should not attempt to deliver submissions using the same delivery service.
        Parameters:
        message - the error message
        cause - the cause of the error
      • DeliveryException

        public DeliveryException​(String message,
                                 boolean isCriticalError)
        Create a delivery exception with the given message, critical error status.
        Parameters:
        message - the error message
        isCriticalError - specifies whether is a critical delivery error and submission using the same service should be attempted
      • DeliveryException

        public DeliveryException​(String message,
                                 Throwable cause,
                                 boolean isCriticalError)
        Create a delivery exception with the given message, cause, critical error status.
        Parameters:
        message - the error message
        cause - the cause of the error
        isCriticalError - specifies whether is a critical delivery error and submission using the same service should be attempted
      • DeliveryException

        public DeliveryException​(String message,
                                 Throwable cause,
                                 String context,
                                 boolean isCriticalError)
        Create a delivery exception with the given message, cause, context and critical error status.
        Parameters:
        message - the error message
        cause - the cause of the error
        context - the error context
        isCriticalError - specifies whether is a critical delivery error and submission using the same service should be attempted
      • DeliveryException

        public DeliveryException​(String message,
                                 Throwable cause,
                                 boolean isCriticalError,
                                 int retryDelayMins)
        Create a delivery exception with the given message, cause, critical error status, retry delay in minutes.
        Parameters:
        message - the error message
        cause - the cause of the error
        isCriticalError - specifies whether is a critical delivery error and submission using the same service should be attempted
        retryDelayMins - the minimum retry delay in minutes
    • Method Detail

      • getContext

        public String getContext()
        Return the error context.
        Returns:
        the error context
      • isCriticalError

        public boolean isCriticalError()
        Return true if a critical error, and the delivery should not be attempted.
        Returns:
        true if a critical error, and the delivery should not be attempted.
      • getRetryDelayMins

        public int getRetryDelayMins()
        Returns:
        the minimum delivery retry delay in minutes
      • toString

        public String toString()
        Overrides:
        toString in class Throwable
        Returns:
        the string representation of the error