org.springframework.batch.core
Interface JobExecutionListener

All Known Implementing Classes:
CompositeJobExecutionListener, JobExecutionListenerSupport

public interface JobExecutionListener

Provide callbacks at specific points in the lifecycle of a Job. Implementations can be stateful if they are careful to either ensure thread safety, or to use one instance of a listener per job, assuming that job instances themselves are not used by more than one thread.

Author:
Dave Syer

Method Summary
 void afterJob(JobExecution jobExecution)
          Callback after completion of a job.
 void beforeJob(JobExecution jobExecution)
          Callback before a job executes.
 

Method Detail

beforeJob

void beforeJob(JobExecution jobExecution)
Callback before a job executes.

Parameters:
jobExecution - the current JobExecution

afterJob

void afterJob(JobExecution jobExecution)
Callback after completion of a job. Called after both both successful and failed executions. To perform logic on a particular status, use "if (jobExecution.getStatus() == BatchStatus.X)".

Parameters:
jobExecution - the current JobExecution


Copyright © 2013 SpringSource. All Rights Reserved.