类 ScheduledMethodRunnable
- java.lang.Object
- org.springframework.scheduling.support.ScheduledMethodRunnable
- 所有已实现的接口:
Runnable
public class ScheduledMethodRunnable extends Object implements Runnable
Variant ofMethodInvokingRunnable
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.- 从以下版本开始:
- 3.0.6
- 作者:
- Juergen Hoeller
- 另请参阅:
ScheduledAnnotationBeanPostProcessor
构造器概要
构造器 构造器 说明 ScheduledMethodRunnable(Object target, Method method)
Create aScheduledMethodRunnable
for the given target instance, calling the specified method.ScheduledMethodRunnable(Object target, String methodName)
Create aScheduledMethodRunnable
for the given target instance, calling the specified method by name.
构造器详细资料
ScheduledMethodRunnable
public ScheduledMethodRunnable(Object target, Method method)
Create aScheduledMethodRunnable
for the given target instance, calling the specified method.- 参数:
target
- the target instance to call the method onmethod
- the target method to call
ScheduledMethodRunnable
public ScheduledMethodRunnable(Object target, String methodName) throws NoSuchMethodException
Create aScheduledMethodRunnable
for the given target instance, calling the specified method by name.- 参数:
target
- the target instance to call the method onmethodName
- the name of the target method- 抛出:
NoSuchMethodException
- if the specified method does not exist