|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.util.MethodInvoker org.springframework.beans.support.ArgumentConvertingMethodInvoker org.springframework.scheduling.support.MethodInvokingRunnable
public class MethodInvokingRunnable
Adapter that implements the Runnable
interface as a configurable
method invocation based on Spring's MethodInvoker.
Inherits common configuration properties from
MethodInvoker
.
ScheduledTimerTask.setRunnable(Runnable)
,
Executor.execute(Runnable)
Field Summary | |
---|---|
private java.lang.ClassLoader |
beanClassLoader
|
protected Log |
logger
|
Constructor Summary | |
---|---|
MethodInvokingRunnable()
|
Method Summary | |
---|---|
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. |
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 |
Field Detail |
---|
protected final Log logger
private java.lang.ClassLoader beanClassLoader
Constructor Detail |
---|
public MethodInvokingRunnable()
Method Detail |
---|
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
BeanClassLoaderAware
class 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 BeanClassLoaderAware
classLoader
- the owning class loader; may be null
in
which case a default ClassLoader
must be used, for example
the ClassLoader
obtained via
ClassUtils.getDefaultClassLoader()
protected java.lang.Class resolveClassName(java.lang.String className) throws java.lang.ClassNotFoundException
MethodInvoker
The default implementations uses ClassUtils.forName
,
using the thread context class loader.
resolveClassName
in class MethodInvoker
className
- the class name to resolve
java.lang.ClassNotFoundException
- if the class name was invalidpublic void afterPropertiesSet() throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
InitializingBean
This 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 InitializingBean
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
public void run()
run
in interface java.lang.Runnable
protected java.lang.String getInvocationFailureMessage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |