org.springframework.scheduling.support
Class MethodInvokingRunnable
java.lang.Object
org.springframework.util.MethodInvoker
org.springframework.beans.support.ArgumentConvertingMethodInvoker
org.springframework.scheduling.support.MethodInvokingRunnable
- All Implemented Interfaces:
- java.lang.Runnable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- MethodInvokingTimerTaskFactoryBean
public class MethodInvokingRunnable
- extends org.springframework.beans.support.ArgumentConvertingMethodInvoker
- implements java.lang.Runnable, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean
Adapter that implements the Runnable
interface as a configurable
method invocation based on Spring's MethodInvoker.
Inherits common configuration properties from
MethodInvoker
.
- Since:
- 1.2.4
- Author:
- Juergen Hoeller
- See Also:
ScheduledTimerTask.setRunnable(Runnable)
,
Executor.execute(Runnable)
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Methods inherited from class org.springframework.beans.support.ArgumentConvertingMethodInvoker |
doFindMatchingMethod, findMatchingMethod, getDefaultTypeConverter, getTypeConverter, registerCustomEditor, setTypeConverter |
Methods inherited from class org.springframework.util.MethodInvoker |
getArguments, getPreparedMethod, getTargetClass, getTargetMethod, getTargetObject, getTypeDifferenceWeight, invoke, isPrepared, prepare, setArguments, setStaticMethod, setTargetClass, setTargetMethod, setTargetObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
MethodInvokingRunnable
public MethodInvokingRunnable()
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
resolveClassName
protected java.lang.Class resolveClassName(java.lang.String className)
throws java.lang.ClassNotFoundException
- Overrides:
resolveClassName
in class org.springframework.util.MethodInvoker
- Throws:
java.lang.ClassNotFoundException
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
getInvocationFailureMessage
protected java.lang.String getInvocationFailureMessage()
- Build a message for an invocation failure exception.
- Returns:
- the error message, including the target method name etc