org.springframework.batch.integration.job
Class JobExecutionRequest

java.lang.Object
  extended by org.springframework.batch.integration.job.JobExecutionRequest

public class JobExecutionRequest
extends Object

Encapsulation of a request to execute a job execution through a message flow consisting of step handlers. A handler should pass the message on as it is, modifying the request properties as necessary. Generally a handler will execute a step as part of the JobExecution passed in, and should change the status to BatchStatus.COMPLETED if the step is successful (generally a handler cannot determine if the whole job execution is complete, so this is just information about the step).
If the incoming status is BatchStatus.FAILED, BatchStatus.STOPPED or BatchStatus.STOPPING the request should be ignored by handlers (passed on without modification).

Author:
Dave Syer

Constructor Summary
JobExecutionRequest(JobExecution jobExecution)
           
 
Method Summary
 JobExecution getJobExecution()
          Public getter for the jobExecution.
 Long getJobId()
           
 Throwable getLastThrowable()
          Public getter for the throwable.
 BatchStatus getStatus()
           
 boolean hasErrors()
           
 void registerThrowable(Throwable throwable)
          Public setter for the throwable.
 void setStatus(BatchStatus status)
          Public setter for the status.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobExecutionRequest

public JobExecutionRequest(JobExecution jobExecution)
Parameters:
jobExecution -
Method Detail

getJobId

public Long getJobId()
Returns:
the current job execution id

getStatus

public BatchStatus getStatus()
Returns:
the current BatchStatus

setStatus

public void setStatus(BatchStatus status)
Public setter for the status.

Parameters:
status - the status to set

hasErrors

public boolean hasErrors()
Returns:
true if there are errors

getLastThrowable

public Throwable getLastThrowable()
Public getter for the throwable.

Returns:
the throwable

registerThrowable

public void registerThrowable(Throwable throwable)
Public setter for the throwable.

Parameters:
throwable - the throwable to set

getJobExecution

public JobExecution getJobExecution()
Public getter for the jobExecution.

Returns:
the jobExecution

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 SpringSource. All Rights Reserved.