public class JsrStepContext
extends java.lang.Object
implements javax.batch.runtime.context.StepContext
StepContext functionality
as specified in JSR-352. Wrapper delegates to the underlying StepExecution to
obtain the related contextual information.| Constructor and Description |
|---|
JsrStepContext(StepExecution stepExecution,
java.util.Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
javax.batch.runtime.BatchStatus |
getBatchStatus() |
java.lang.Exception |
getException()
To support both JSR-352's requirement to return the most recent exception
and Spring Batch's support for
Throwable, this implementation will
return the most recent exception in the underlying StepExecution's
failure exceptions list. |
java.lang.String |
getExitStatus() |
javax.batch.runtime.Metric[] |
getMetrics() |
java.io.Serializable |
getPersistentUserData() |
java.util.Properties |
getProperties() |
long |
getStepExecutionId() |
java.lang.String |
getStepName() |
java.lang.Object |
getTransientUserData() |
void |
setExitStatus(java.lang.String status) |
void |
setPersistentUserData(java.io.Serializable data) |
void |
setTransientUserData(java.lang.Object data) |
public JsrStepContext(StepExecution stepExecution, java.util.Properties properties)
public java.lang.String getStepName()
getStepName in interface javax.batch.runtime.context.StepContextpublic java.lang.Object getTransientUserData()
getTransientUserData in interface javax.batch.runtime.context.StepContextpublic void setTransientUserData(java.lang.Object data)
setTransientUserData in interface javax.batch.runtime.context.StepContextpublic long getStepExecutionId()
getStepExecutionId in interface javax.batch.runtime.context.StepContextpublic java.util.Properties getProperties()
getProperties in interface javax.batch.runtime.context.StepContextpublic java.io.Serializable getPersistentUserData()
getPersistentUserData in interface javax.batch.runtime.context.StepContextpublic void setPersistentUserData(java.io.Serializable data)
setPersistentUserData in interface javax.batch.runtime.context.StepContextpublic javax.batch.runtime.BatchStatus getBatchStatus()
getBatchStatus in interface javax.batch.runtime.context.StepContextpublic java.lang.String getExitStatus()
getExitStatus in interface javax.batch.runtime.context.StepContextpublic void setExitStatus(java.lang.String status)
setExitStatus in interface javax.batch.runtime.context.StepContextpublic java.lang.Exception getException()
Throwable, this implementation will
return the most recent exception in the underlying StepExecution's
failure exceptions list. If the exception there extends Throwable
instead of Exception, it will be wrapped in an Exception and
then returned.getException in interface javax.batch.runtime.context.StepContextStepContext.getException()public javax.batch.runtime.Metric[] getMetrics()
getMetrics in interface javax.batch.runtime.context.StepContext