Class MethodInvokingTaskletAdapter

  • All Implemented Interfaces:
    Tasklet, org.springframework.beans.factory.InitializingBean

    public class MethodInvokingTaskletAdapter
    extends AbstractMethodInvokingDelegator<java.lang.Object>
    implements Tasklet
    A Tasklet that wraps a method in a POJO. By default the return value is ExitStatus.COMPLETED unless the delegate POJO itself returns an ExitStatus. The POJO method is usually going to have no arguments, but a static argument or array of arguments can be used by setting the arguments property.
    Author:
    Dave Syer, Mahmoud Ben Hassine
    See Also:
    AbstractMethodInvokingDelegator
    • Constructor Detail

      • MethodInvokingTaskletAdapter

        public MethodInvokingTaskletAdapter()
    • Method Detail

      • mapResult

        protected ExitStatus mapResult​(java.lang.Object result)
        If the result is an ExitStatus already just return that, otherwise return ExitStatus.COMPLETED.
        Parameters:
        result - the value returned by the delegate method
        Returns:
        an ExitStatus consistent with the result