org.springframework.scheduling.support
Class ScheduledMethodRunnable
java.lang.Object
org.springframework.scheduling.support.ScheduledMethodRunnable
- All Implemented Interfaces:
- java.lang.Runnable
public class ScheduledMethodRunnable
- extends java.lang.Object
- implements java.lang.Runnable
Variant of MethodInvokingRunnable
meant to be used for processing
of no-arg scheduled methods. Propagates user exceptions to the caller,
assuming that an error strategy for Runnables is in place.
- Since:
- 3.0.6
- Author:
- Juergen Hoeller
- See Also:
ScheduledAnnotationBeanPostProcessor
Field Summary |
private java.lang.reflect.Method |
method
|
private java.lang.Object |
target
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
private final java.lang.Object target
method
private final java.lang.reflect.Method method
ScheduledMethodRunnable
public ScheduledMethodRunnable(java.lang.Object target,
java.lang.reflect.Method method)
ScheduledMethodRunnable
public ScheduledMethodRunnable(java.lang.Object target,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
getTarget
public java.lang.Object getTarget()
getMethod
public java.lang.reflect.Method getMethod()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable