Spring Framework

org.springframework.scheduling.support
Class DelegatingErrorHandlingRunnable

java.lang.Object
  extended by org.springframework.scheduling.support.DelegatingErrorHandlingRunnable
All Implemented Interfaces:
java.lang.Runnable

public class DelegatingErrorHandlingRunnable
extends java.lang.Object
implements java.lang.Runnable

Runnable wrapper that catches any exception or error thrown from its delegate Runnable and allows an ErrorHandler to handle it.

Since:
3.0
Author:
Juergen Hoeller, Mark Fisher

Constructor Summary
DelegatingErrorHandlingRunnable(java.lang.Runnable delegate, ErrorHandler errorHandler)
          Create a new DelegatingErrorHandlingRunnable.
 
Method Summary
 void run()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingErrorHandlingRunnable

public DelegatingErrorHandlingRunnable(java.lang.Runnable delegate,
                                       ErrorHandler errorHandler)
Create a new DelegatingErrorHandlingRunnable.

Parameters:
delegate - the Runnable implementation to delegate to
errorHandler - the ErrorHandler for handling any exceptions
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Framework