public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker implements 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 the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc. |
protected String |
getInvocationFailureMessage()
Build a message for an invocation failure exception.
|
protected Class<?> |
resolveClassName(String className)
Resolve the given class name into a Class.
|
void |
run() |
void |
setBeanClassLoader(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(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 Class<?> resolveClassName(String className) throws ClassNotFoundException
MethodInvokerThe default implementations uses ClassUtils.forName,
using the thread context class loader.
resolveClassName in class MethodInvokerclassName - the class name to resolveClassNotFoundException - if the class name was invalidpublic void afterPropertiesSet()
throws ClassNotFoundException,
NoSuchMethodException
InitializingBeanBeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet in interface InitializingBeanClassNotFoundExceptionNoSuchMethodExceptionprotected String getInvocationFailureMessage()