public class TimeBombSkipException extends SkipException
SkipException extension that transforms a skipped method into a failed method based on
a time trigger.
By default the time format is yyyy/MM/dd (according to SimpleDateFormat). You can
customize this by using the specialized constructors. Suppported date formats are according to
the SimpleDateFormat.
| Constructor and Description |
|---|
TimeBombSkipException(String msg,
Date expirationDate)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(String msg,
Date expirationDate,
String format)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(String msg,
Date expirationDate,
String format,
Throwable cause)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(String msg,
Date expirationDate,
Throwable cause)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(String msg,
String date)
Creates a
TimeBombedSkipException using the date in the format
yyyy/MM/dd. |
TimeBombSkipException(String msg,
String date,
String format)
Creates a
TimeBombedSkipException using the date in the specified format
format. |
TimeBombSkipException(String msg,
String date,
String inFormat,
String outFormat)
Creates a
TimeBombedSkipException using the date in the specified format
inFormat. |
TimeBombSkipException(String msg,
String date,
String inFormat,
String outFormat,
Throwable cause)
Creates a
TimeBombedSkipException using the date in the specified format
inFormat. |
TimeBombSkipException(String msg,
String date,
String format,
Throwable cause)
Creates a
TimeBombedSkipException using the date in the specified format
format. |
TimeBombSkipException(String msg,
String date,
Throwable cause)
Creates a
TimeBombedSkipException using the date in the format
yyyy/MM/dd. |
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage() |
boolean |
isSkip()
Flag if the current exception marks a skipped method (
true) or a failure (
false). |
void |
printStackTrace(PrintStream s) |
void |
printStackTrace(PrintWriter s) |
reduceStackTrace, restoreStackTraceaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toStringpublic TimeBombSkipException(String msg, Date expirationDate)
TimeBombedSkipException using the expirationDate. The format
used for date comparison is yyyy/MM/ddmsg - exception messageexpirationDate - time limit after which the SKIP becomes a FAILUREpublic TimeBombSkipException(String msg, Date expirationDate, String format)
TimeBombedSkipException using the expirationDate. The
format parameter wiil be used for performing the time comparison.msg - exception messageexpirationDate - time limit after which the SKIP becomes a FAILUREformat - format for the time comparisonpublic TimeBombSkipException(String msg, String date)
TimeBombedSkipException using the date in the format
yyyy/MM/dd.msg - exception messagedate - time limit after which the SKIP becomes a FAILUREpublic TimeBombSkipException(String msg, String date, String format)
TimeBombedSkipException using the date in the specified format
format. The same format is used when performing the time comparison.msg - exception messagedate - time limit after which the SKIP becomes a FAILUREformat - format of the passed in date and of the time comparisonpublic TimeBombSkipException(String msg, String date, String inFormat, String outFormat)
TimeBombedSkipException using the date in the specified format
inFormat. The outFormat will be used to perform the time comparison
and display.msg - exception messagedate - time limit after which the SKIP becomes a FAILUREinFormat - format of the passed in dateoutFormat - format of the time comparisonpublic TimeBombSkipException(String msg, Date expirationDate, Throwable cause)
TimeBombedSkipException using the expirationDate. The format
used for date comparison is yyyy/MM/ddmsg - exception messageexpirationDate - time limit after which the SKIP becomes a FAILUREcause - the cause (which is saved for later retrieval by the Throwable.getCause() method).
(A null value is permitted, and indicates that the cause is nonexistent or
unknown.)public TimeBombSkipException(String msg, Date expirationDate, String format, Throwable cause)
TimeBombedSkipException using the expirationDate. The
format parameter wiil be used for performing the time comparison.msg - exception messageexpirationDate - time limit after which the SKIP becomes a FAILUREformat - format for the time comparisoncause - the cause (which is saved for later retrieval by the Throwable.getCause() method).
(A null value is permitted, and indicates that the cause is nonexistent or
unknown.)public TimeBombSkipException(String msg, String date, Throwable cause)
TimeBombedSkipException using the date in the format
yyyy/MM/dd.msg - exception messagedate - time limit after which the SKIP becomes a FAILUREcause - the cause (which is saved for later retrieval by the Throwable.getCause() method).
(A null value is permitted, and indicates that the cause is nonexistent or
unknown.)public TimeBombSkipException(String msg, String date, String format, Throwable cause)
TimeBombedSkipException using the date in the specified format
format. The same format is used when performing the time comparison.msg - exception messagedate - time limit after which the SKIP becomes a FAILUREformat - format of the passed in date and of the time comparisoncause - the cause (which is saved for later retrieval by the Throwable.getCause() method).
(A null value is permitted, and indicates that the cause is nonexistent or
unknown.)public TimeBombSkipException(String msg, String date, String inFormat, String outFormat, Throwable cause)
TimeBombedSkipException using the date in the specified format
inFormat. The outFormat will be used to perform the time comparison
and display.msg - exception messagedate - time limit after which the SKIP becomes a FAILUREinFormat - format of the passed in dateoutFormat - format of the time comparisoncause - the cause (which is saved for later retrieval by the Throwable.getCause() method).
(A null value is permitted, and indicates that the cause is nonexistent or
unknown.)public boolean isSkip()
SkipExceptiontrue) or a failure (
false). By default Subclasses should override this method in order to provide smarter
behavior.isSkip in class SkipExceptiontrue if the method should be considered a skip, false if the
method should be considered failed. If not overwritten it returns truepublic String getMessage()
getMessage in class Throwablepublic void printStackTrace(PrintStream s)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter s)
printStackTrace in class ThrowableCopyright © 2025. All rights reserved.