Package org.springframework.batch.core

# Class JobInterruptedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.springframework.batch.core.JobExecutionException
org.springframework.batch.core.JobInterruptedException

All Implemented Interfaces:
  `Serializable`

public class JobInterruptedException extends JobExecutionException
Exception to indicate the job has been interrupted. The exception state indicated is not normally recoverable by batch application clients, but internally it is useful to force a check. The exception will often be wrapped in a runtime exception (usually `UnexpectedJobExecutionException` before reaching the client.

Author:
  Lucas Ward, Dave Syer
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JobInterruptedException(String msg)`
  `JobInterruptedException(String msg, BatchStatus status)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BatchStatus`
  `getStatus()`
  The desired status of the surrounding execution after the interruption.

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- ## Constructor Details

  - ### JobInterruptedException

    public JobInterruptedException(String msg)

  - ### JobInterruptedException

    public JobInterruptedException(String msg, BatchStatus status)

- ## Method Details

  - ### getStatus

    public BatchStatus getStatus()
    The desired status of the surrounding execution after the interruption.
    Returns:
      the status of the interruption (default STOPPED)