public class ScheduledMethodRunnable extends Object implements Runnable
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.ScheduledAnnotationBeanPostProcessor| 构造器和说明 |
|---|
ScheduledMethodRunnable(Object target,
Method method)
Create a
ScheduledMethodRunnable for the given target instance,
calling the specified method. |
ScheduledMethodRunnable(Object target,
String methodName)
Create a
ScheduledMethodRunnable for the given target instance,
calling the specified method by name. |
public ScheduledMethodRunnable(Object target, Method method)
ScheduledMethodRunnable for the given target instance,
calling the specified method.target - the target instance to call the method onmethod - the target method to callpublic ScheduledMethodRunnable(Object target, String methodName) throws NoSuchMethodException
ScheduledMethodRunnable 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 methodNoSuchMethodException - if the specified method does not exist