Package com.avoka.fc.forms.api
Class DeliveryException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.avoka.fc.forms.api.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 Summary
Constructors Constructor Description DeliveryException(String message)Create a critical delivery exception with the given message.DeliveryException(String message, boolean isCriticalError)Create a delivery exception with the given message, critical error status.DeliveryException(String message, Throwable cause)Create a critical delivery exception with the given message and cause.DeliveryException(String message, Throwable cause, boolean isCriticalError)Create a delivery exception with the given message, cause, critical error status.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.DeliveryException(String message, Throwable cause, String context, boolean isCriticalError)Create a delivery exception with the given message, cause, context and critical error status.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContext()Return the error context.intgetRetryDelayMins()booleanisCriticalError()Return true if a critical error, and the delivery should not be attempted.StringtoString()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
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 messagecause- 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 messageisCriticalError- 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 messagecause- the cause of the errorisCriticalError- 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 messagecause- the cause of the errorcontext- the error contextisCriticalError- 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 messagecause- the cause of the errorisCriticalError- specifies whether is a critical delivery error and submission using the same service should be attemptedretryDelayMins- 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
-
-