Package javax.batch.runtime.context
Interface JobContext
public interface JobContext
-
Method Summary
Modifier and TypeMethodDescriptionThe getBatchStatus method simply returns the batch status value set by the batch runtime into the job context.long
The getExecutionId method returns the current job's current execution id.The getExitStatus method simply returns the exit status value stored into the job context through the setExitStatus method or null.long
The getInstanceId method returns the current job's instance id.Get job nameThe getProperties method returns the job level properties specified in a job definition.The getTransientUserData method returns a transient data object belonging to the current Job XML execution element.void
setExitStatus
(String status) The setExitStatus method assigns the user-specified exit status for the current job.void
setTransientUserData
(Object data) The setTransientUserData method stores a transient data object into the current batch context.
-
Method Details
-
getJobName
String getJobName()Get job name- Returns:
- value of 'id' attribute from
-
getTransientUserData
Object getTransientUserData()The getTransientUserData method returns a transient data object belonging to the current Job XML execution element.- Returns:
- user-specified type
-
setTransientUserData
The setTransientUserData method stores a transient data object into the current batch context.- Parameters:
data
- is the user-specified type
-
getInstanceId
long getInstanceId()The getInstanceId method returns the current job's instance id.- Returns:
- job instance id
-
getExecutionId
long getExecutionId()The getExecutionId method returns the current job's current execution id.- Returns:
- job execution id
-
getProperties
Properties getProperties()The getProperties method returns the job level properties specified in a job definition.- Returns:
- job level properties
-
getBatchStatus
BatchStatus getBatchStatus()The getBatchStatus method simply returns the batch status value set by the batch runtime into the job context.- Returns:
- batch status string
-
getExitStatus
String getExitStatus()The getExitStatus method simply returns the exit status value stored into the job context through the setExitStatus method or null.- Returns:
- exit status string
-
setExitStatus
The setExitStatus method assigns the user-specified exit status for the current job. When the job ends, the exit status of the job is the value specified through setExitStatus. If setExitStatus was not called or was called with a null value, then the exit status defaults to the batch status of the job.
-