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(java.lang.String msg,
java.util.Date expirationDate)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(java.lang.String msg,
java.util.Date expirationDate,
java.lang.String format)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(java.lang.String msg,
java.util.Date expirationDate,
java.lang.String format,
java.lang.Throwable cause)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(java.lang.String msg,
java.util.Date expirationDate,
java.lang.Throwable cause)
Creates a
TimeBombedSkipException using the expirationDate. |
TimeBombSkipException(java.lang.String msg,
java.lang.String date)
Creates a
TimeBombedSkipException using the date
in the format yyyy/MM/dd. |
TimeBombSkipException(java.lang.String msg,
java.lang.String date,
java.lang.String format)
Creates a
TimeBombedSkipException using the date
in the specified format format. |
TimeBombSkipException(java.lang.String msg,
java.lang.String date,
java.lang.String inFormat,
java.lang.String outFormat)
Creates a
TimeBombedSkipException using the date
in the specified format inFormat. |
TimeBombSkipException(java.lang.String msg,
java.lang.String date,
java.lang.String inFormat,
java.lang.String outFormat,
java.lang.Throwable cause)
Creates a
TimeBombedSkipException using the date
in the specified format inFormat. |
TimeBombSkipException(java.lang.String msg,
java.lang.String date,
java.lang.String format,
java.lang.Throwable cause)
Creates a
TimeBombedSkipException using the date
in the specified format format. |
TimeBombSkipException(java.lang.String msg,
java.lang.String date,
java.lang.Throwable cause)
Creates a
TimeBombedSkipException using the date
in the format yyyy/MM/dd. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage() |
boolean |
isSkip()
Flag if the current exception marks a skipped method (true)
or a failure (false).
|
void |
printStackTrace(java.io.PrintStream s) |
void |
printStackTrace(java.io.PrintWriter s) |
reduceStackTrace, restoreStackTrace
public TimeBombSkipException(java.lang.String msg, java.util.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(java.lang.String msg, java.util.Date expirationDate, java.lang.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(java.lang.String msg, java.lang.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(java.lang.String msg, java.lang.String date, java.lang.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(java.lang.String msg, java.lang.String date, java.lang.String inFormat, java.lang.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(java.lang.String msg, java.util.Date expirationDate, java.lang.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(java.lang.String msg, java.util.Date expirationDate, java.lang.String format, java.lang.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(java.lang.String msg, java.lang.String date, java.lang.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(java.lang.String msg, java.lang.String date, java.lang.String format, java.lang.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(java.lang.String msg, java.lang.String date, java.lang.String inFormat, java.lang.String outFormat, java.lang.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()
SkipException
isSkip
in class SkipException
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter s)
printStackTrace
in class java.lang.Throwable