Browse Source

updated javadoc

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2019 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Mark Fisher 17 years ago
parent
commit
23129d453c
  1. 11
      org.springframework.context/src/main/java/org/springframework/scheduling/support/TaskUtils.java

11
org.springframework.context/src/main/java/org/springframework/scheduling/support/TaskUtils.java

@ -26,6 +26,11 @@ import org.springframework.util.ReflectionUtils; @@ -26,6 +26,11 @@ import org.springframework.util.ReflectionUtils;
/**
* Utility methods for decorating tasks with error handling.
* <p>
* <b>NOTE:</b> This class is intended for internal use by Spring's scheduler
* implementations. It is only public so that it may be accessed from
* implementations within other packages. It is <i>not</i> intended for general
* use and may change in the future.
*
* @author Mark Fisher
* @since 3.0
@ -65,6 +70,12 @@ public abstract class TaskUtils { @@ -65,6 +70,12 @@ public abstract class TaskUtils {
return new DelegatingErrorHandlingRunnable(task, eh);
}
/**
* Return the default {@link ErrorHandler} implementation based on the boolean
* value indicating whether the task will be repeating or not. For repeating tasks
* it will suppress errors, but for one-time tasks it will propagate. In both
* cases, the error will be logged.
*/
public static ErrorHandler getDefaultErrorHandler(boolean isRepeatingTask) {
return (isRepeatingTask ? LOG_AND_SUPPRESS_ERROR_HANDLER : LOG_AND_PROPAGATE_ERROR_HANDLER);
}

Loading…
Cancel
Save