Note
This class is intended for internal use by Spring's scheduler implementations. It is only public so that it may be accessed from impl classes within other packages. It is not intended for general use.
| Modifier and Type | Class and Description |
|---|---|
| private static class | TaskUtils.LoggingErrorHandler
An |
| private static class | TaskUtils.PropagatingErrorHandler
An |
| Modifier and Type | Field and Description |
|---|---|
| public static final ErrorHandler | LOG_AND_PROPAGATE_ERROR_HANDLER
An ErrorHandler strategy that will log at error level and then re-throw the Exception. |
| public static final ErrorHandler | LOG_AND_SUPPRESS_ERROR_HANDLER
An ErrorHandler strategy that will log the Exception but perform no further handling. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static DelegatingErrorHandlingRunnable | decorateTaskWithErrorHandler(Runnable task, ErrorHandler errorHandler, boolean isRepeatingTask)
Decorate the task for error handling. |
| public static ErrorHandler | getDefaultErrorHandler(boolean isRepeatingTask)
Return the default |
| LOG_AND_PROPAGATE_ERROR_HANDLER | back to summary |
|---|---|
| public static final ErrorHandler LOG_AND_PROPAGATE_ERROR_HANDLER An ErrorHandler strategy that will log at error level and then re-throw the Exception. Note this will typically prevent subsequent execution of a scheduled task. | |
| LOG_AND_SUPPRESS_ERROR_HANDLER | back to summary |
|---|---|
| public static final ErrorHandler LOG_AND_SUPPRESS_ERROR_HANDLER An ErrorHandler strategy that will log the Exception but perform no further handling. This will suppress the error so that subsequent executions of the task will not be prevented. | |
| TaskUtils | back to summary |
|---|---|
| public TaskUtils() | |
| decorateTaskWithErrorHandler | back to summary |
|---|---|
| public static DelegatingErrorHandlingRunnable decorateTaskWithErrorHandler(Runnable task, ErrorHandler errorHandler, boolean isRepeatingTask) Decorate the task for error handling. If the provided | |
| getDefaultErrorHandler | back to summary |
|---|---|
| public static ErrorHandler getDefaultErrorHandler(boolean isRepeatingTask) Return the default | |
ErrorHandler implementation that logs the Throwable at error
level. It does not perform any additional error handling. This can be
useful when suppression of errors is the intended behavior.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | handleError(Throwable t)
Implements org. |
| logger | back to summary |
|---|---|
| private final Log logger | |
| LoggingErrorHandler | back to summary |
|---|---|
| private LoggingErrorHandler() | |
| handleError | back to summary |
|---|---|
| public void handleError(Throwable t) Implements org. Doc from org. Handle the given error, possibly rethrowing it as a fatal exception.
| |
ErrorHandler implementation that logs the Throwable at error
level and then propagates it.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | handleError(Throwable t)
Overrides org. Implements org. |
| PropagatingErrorHandler | back to summary |
|---|---|
| private PropagatingErrorHandler() | |
| handleError | back to summary |
|---|---|
| public void handleError(Throwable t) Overrides org. Implements org. Doc from org. Handle the given error, possibly rethrowing it as a fatal exception.
| |