Class MethodInvokingRunnable
java.lang.Object
org.springframework.util.MethodInvoker
org.springframework.beans.support.ArgumentConvertingMethodInvoker
org.springframework.scheduling.support.MethodInvokingRunnable
- All Implemented Interfaces:
- Runnable,- Aware,- BeanClassLoaderAware,- InitializingBean
public class MethodInvokingRunnable
extends ArgumentConvertingMethodInvoker
implements Runnable, BeanClassLoaderAware, 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:
- 
Field SummaryFieldsFields inherited from class org.springframework.util.MethodInvokertargetClass
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.protected StringBuild a message for an invocation failure exception.protected Class<?>resolveClassName(String className) Resolve the given class name into a Class.voidrun()voidsetBeanClassLoader(ClassLoader classLoader) Callback that supplies the beanclass loaderto a bean instance.Methods inherited from class org.springframework.beans.support.ArgumentConvertingMethodInvokerdoFindMatchingMethod, findMatchingMethod, getDefaultTypeConverter, getTypeConverter, registerCustomEditor, setTypeConverterMethods inherited from class org.springframework.util.MethodInvokergetArguments, getPreparedMethod, getTargetClass, getTargetMethod, getTargetObject, getTypeDifferenceWeight, invoke, isPrepared, prepare, setArguments, setStaticMethod, setTargetClass, setTargetMethod, setTargetObject
- 
Field Details- 
loggerprotected final org.apache.commons.logging.Log logger
 
- 
- 
Constructor Details- 
MethodInvokingRunnablepublic MethodInvokingRunnable()
 
- 
- 
Method Details- 
setBeanClassLoaderDescription copied from interface:BeanClassLoaderAwareCallback that supplies the beanclass loaderto a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean'sInitializingBean.afterPropertiesSet()method or a custom init-method.- Specified by:
- setBeanClassLoaderin interface- BeanClassLoaderAware
- Parameters:
- classLoader- the owning class loader
 
- 
resolveClassNameDescription copied from class:MethodInvokerResolve the given class name into a Class.The default implementations uses ClassUtils.forName, using the thread context class loader.- Overrides:
- resolveClassNamein class- MethodInvoker
- Parameters:
- className- the class name to resolve
- Returns:
- the resolved Class
- Throws:
- ClassNotFoundException- if the class name was invalid
 
- 
afterPropertiesSetDescription copied from interface:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. - Specified by:
- afterPropertiesSetin interface- InitializingBean
- Throws:
- ClassNotFoundException
- NoSuchMethodException
 
- 
runpublic void run()
- 
getInvocationFailureMessageBuild a message for an invocation failure exception.- Returns:
- the error message, including the target method name etc
 
 
-