public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker implements java.lang.Runnable, BeanClassLoaderAware, InitializingBean
Runnable interface as a configurable
method invocation based on Spring's MethodInvoker.
Inherits common configuration properties from
MethodInvoker.
Executor.execute(Runnable)| Modifier and Type | Field and Description |
|---|---|
protected Log |
logger |
targetClass| Constructor and Description |
|---|
MethodInvokingRunnable() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
protected java.lang.String |
getInvocationFailureMessage()
Build a message for an invocation failure exception.
|
protected java.lang.Class<?> |
resolveClassName(java.lang.String className)
Resolve the given class name into a Class.
|
void |
run() |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader)
Callback that supplies the bean
class loader to
a bean instance. |
doFindMatchingMethod, findMatchingMethod, getDefaultTypeConverter, getTypeConverter, registerCustomEditor, setTypeConvertergetArguments, getPreparedMethod, getTargetClass, getTargetMethod, getTargetObject, getTypeDifferenceWeight, invoke, isPrepared, prepare, setArguments, setStaticMethod, setTargetClass, setTargetMethod, setTargetObjectprotected final Log logger
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
BeanClassLoaderAwareclass loader to
a bean instance.
Invoked after the population of normal bean properties but
before an initialization callback such as
InitializingBean's
InitializingBean.afterPropertiesSet()
method or a custom init-method.
setBeanClassLoader in interface BeanClassLoaderAwareclassLoader - the owning class loaderprotected java.lang.Class<?> resolveClassName(java.lang.String className)
throws java.lang.ClassNotFoundException
MethodInvokerThe default implementations uses ClassUtils.forName,
using the thread context class loader.
resolveClassName in class MethodInvokerclassName - the class name to resolvejava.lang.ClassNotFoundException - if the class name was invalidpublic void afterPropertiesSet()
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException
InitializingBeanThis method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet in interface InitializingBeanjava.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionpublic void run()
run in interface java.lang.Runnableprotected java.lang.String getInvocationFailureMessage()