org.springframework.batch.integration.job
Class JobExecutionRequest

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

public class JobExecutionRequest
extends java.lang.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.ABANDONED or BatchStatus.STOPPING the request should be ignored by handlers (passed on without modification).

Author:
Dave Syer

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

Constructor Detail

JobExecutionRequest

public JobExecutionRequest(org.springframework.batch.core.JobExecution jobExecution)
Parameters:
jobExecution -
Method Detail

getJobId

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

getStatus

public org.springframework.batch.core.BatchStatus getStatus()
Returns:
the current BatchStatus

setStatus

public void setStatus(org.springframework.batch.core.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 java.lang.Throwable getLastThrowable()
Public getter for the throwable.

Returns:
the throwable

registerThrowable

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

Parameters:
throwable - the throwable to set

getJobExecution

public org.springframework.batch.core.JobExecution getJobExecution()
Public getter for the jobExecution.

Returns:
the jobExecution

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.