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 .
Useful to generically encapsulate a method invocation as timer task
for java.util.Timer , in combination with a
org.springframework.scheduling.timer.DelegatingTimerTask adapter.
Can also be used with JDK 1.5's java.util.concurrent.Executor
abstraction, which works with plain Runnables.
Extended by Spring's
org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean adapter for java.util.TimerTask . Note that you can populate a
ScheduledTimerTask object with a plain MethodInvokingRunnable instance
as well, which will automatically get wrapped with a DelegatingTimerTask.
author: Juergen Hoeller since: 1.2.4 See Also: org.springframework.scheduling.timer.ScheduledTimerTask.setRunnable(Runnable) See Also: java.util.concurrent.Executor.execute(Runnable) |