spring-framework / org.springframework.scheduling.support / MethodInvokingRunnable

MethodInvokingRunnable

open class MethodInvokingRunnable : ArgumentConvertingMethodInvoker, Runnable, BeanClassLoaderAware, InitializingBean

Adapter that implements the Runnable interface as a configurable method invocation based on Spring's MethodInvoker.

Inherits common configuration properties from org.springframework.util.MethodInvoker.

Author
Juergen Hoeller

Since
1.2.4

See Also
java.util.concurrent.Executor#execute(Runnable)

Constructors

<init>

MethodInvokingRunnable()

Adapter that implements the Runnable interface as a configurable method invocation based on Spring's MethodInvoker.

Inherits common configuration properties from org.springframework.util.MethodInvoker.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

run

open fun run(): Unit

setBeanClassLoader

open fun setBeanClassLoader(classLoader: ClassLoader): Unit

Inherited Functions

getTypeConverter

open fun getTypeConverter(): TypeConverter

Return the TypeConverter used for argument type conversion.

Can be cast to org.springframework.beans.PropertyEditorRegistry if direct access to the underlying PropertyEditors is desired (provided that the present TypeConverter actually implements the PropertyEditorRegistry interface).

registerCustomEditor

open fun registerCustomEditor(requiredType: Class<*>, propertyEditor: PropertyEditor): Unit

Register the given custom property editor for all properties of the given type.

Typically used in conjunction with the default org.springframework.beans.SimpleTypeConverter; will work with any TypeConverter that implements the PropertyEditorRegistry interface as well.

setTypeConverter

open fun setTypeConverter(typeConverter: TypeConverter): Unit

Set a TypeConverter to use for argument type conversion.

Default is a org.springframework.beans.SimpleTypeConverter. Can be overridden with any TypeConverter implementation, typically a pre-configured SimpleTypeConverter or a BeanWrapperImpl instance.