org.springframework.batch.core.jsr.step.batchlet

## Class BatchletAdapter

- java.lang.Object
- - org.springframework.batch.core.jsr.step.batchlet.BatchletAdapter

- All Implemented Interfaces:
    StoppableTasklet, Tasklet

      public class BatchletAdapter
      extends java.lang.Object
      implements StoppableTasklet

  Since:
    3.0
  Author:
    Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BatchletAdapter(javax.batch.api.Batchlet batchlet)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RepeatStatus` | `execute(StepContribution contribution, ChunkContext chunkContext)` Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction.
    `void` | `stop()` Used to signal that the job this `Tasklet` is executing within has been requested to stop.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BatchletAdapter

          public BatchletAdapter(javax.batch.api.Batchlet batchlet)

  - ### Method Detail

    - #### execute

          public RepeatStatus execute(StepContribution contribution,
                                      ChunkContext chunkContext)
                               throws java.lang.Exception

      Description copied from interface: `Tasklet`
      Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction. Implementations return `RepeatStatus.FINISHED` if finished. If not they return `RepeatStatus.CONTINUABLE`. On failure throws an exception.
      Specified by:
        `execute` in interface `Tasklet`
      Parameters:
        `contribution` - mutable state to be passed back to update the current step execution
        `chunkContext` - attributes shared between invocations but not between restarts
      Returns:
        an `RepeatStatus` indicating whether processing is continuable.
      Throws:
        `java.lang.Exception`

    - #### stop

          public void stop()

      Description copied from interface: `StoppableTasklet`
      Used to signal that the job this `Tasklet` is executing within has been requested to stop.
      Specified by:
        `stop` in interface `StoppableTasklet`