Class MethodInvokingRunnable
java.lang.Object
org.springframework.util.MethodInvoker
org.springframework.beans.support.ArgumentConvertingMethodInvoker
org.springframework.scheduling.support.MethodInvokingRunnable
- All Implemented Interfaces:
Runnable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.InitializingBean
public class MethodInvokingRunnable
extends org.springframework.beans.support.ArgumentConvertingMethodInvoker
implements 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:
-
Field Summary
Fields inherited from class org.springframework.util.MethodInvoker
targetClass
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected String
Build a message for an invocation failure exception.protected Class<?>
resolveClassName
(String className) void
run()
void
setBeanClassLoader
(ClassLoader classLoader) 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
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
MethodInvokingRunnable
public MethodInvokingRunnable()
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
resolveClassName
- Overrides:
resolveClassName
in classorg.springframework.util.MethodInvoker
- Throws:
ClassNotFoundException
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
ClassNotFoundException
NoSuchMethodException
-
run
public void run() -
getInvocationFailureMessage
Build a message for an invocation failure exception.- Returns:
- the error message, including the target method name etc
-