Example usage for org.springframework.batch.core.step.tasklet MethodInvokingTaskletAdapter MethodInvokingTaskletAdapter

List of usage examples for org.springframework.batch.core.step.tasklet MethodInvokingTaskletAdapter MethodInvokingTaskletAdapter

Introduction

In this page you can find the example usage for org.springframework.batch.core.step.tasklet MethodInvokingTaskletAdapter MethodInvokingTaskletAdapter.

Prototype

MethodInvokingTaskletAdapter

Source Link

Usage

From source file:com.github.jrrdev.mantisbtsync.core.jobs.common.CommonTasklets.java

/**
 * Build the tasklet executing the portal authentication.
 *
 * @param authManager//w  w w  .j  a  va 2s . c om
 *       the portal authentication manager
 * @return the tasklet executing the portal authentication
 */
@Bean
@StepScope
public MethodInvokingTaskletAdapter authTasklet(final PortalAuthManager authManager) {
    final MethodInvokingTaskletAdapter authTasklet = new MethodInvokingTaskletAdapter();
    authTasklet.setTargetObject(authManager);
    authTasklet.setTargetMethod("authentificate");
    return authTasklet;
}