com.ibm.websphere.batch.context
Class JobStepContext
- java.lang.Object
com.ibm.ws.batch.context.JobStepContextBase
com.ibm.websphere.batch.context.JobStepContext
All implemented interfaces:
com.ibm.batch.api.context.JobStepContext, java.io.Serializable
- public class JobStepContext
- extends com.ibm.ws.batch.context.JobStepContextBase
- BatchJobStepInterface
- BatchDataStream
- CheckpointPolicyAlgorithm
- ResultsAlgorithm
See Also:
Constructor Summary
Constructor and Description |
---|
JobStepContext()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addRetryListener(RetryListener retryListener)
|
|
getJobID()
Returns job name of current job.
|
|
getJobLevelPersistentUserData()
Return the persistent job-level user data object for this job
|
|
getJobLevelProperties()
|
|
getJobLevelTransientUserData()
Return the transient job-level user data object for this job
|
|
getJobLevelUserData()
Deprecated. Please use getJobLevelTransientUserData APIs instead.
|
|
getJobListenerProperties()
Return the job-level properties object
|
getJobStepID()
Returns JobStepID object for current step.
|
|
getRecordMetrics(java.lang.String bdsname)
Return the bds-level metrics (skip and records per second)
|
|
|
getReturnCode()
Return the return code explicitly set by the user using setReturnCode.
|
|
getSharedSQLConnection()
|
|
getStepID()
Returns step name of current step.
|
|
getStepLevelPersistentData()
Deprecated. Please use getJobLevelPersistentUserData API instead.
|
|
getStepLevelTransientUserData()
Returns the transient user data stored in this context for this step
|
getStepMetrics()
Return the step-level metrics (time and retry)
|
|
|
getSubmitterID()
Return the user id of the user who submits this job
|
|
getUserAccountingId()
Return the accounting id set by the user in the submitted xJCL
|
|
getUserControlledTransaction()
|
|
getUserData()
Deprecated. Please use getStepLevelTransientUserData API instead.
|
|
getUserException()
Return any exception thrown during processJobStep saved by the runtime
|
|
setJobLevelPersistentUserData(java.io.Externalizable ext)
Return the persistent job-level user data object for this job
|
|
setJobLevelTransientUserData(java.lang.Object obj)
Set the transient job-level user data object for this job
|
|
setJobLevelUserData(java.lang.Object o)
Deprecated. Please use setJobLevelTransientUserData API instead.
|
|
setReturnCode(int rc)
To be used mainly by CI jobs to communicate return code back to the caller.
|
|
setStepLevelPersistentData(java.io.Externalizable o)
Deprecated. Please use setJobLevelPesistentUserData API instead.
|
|
setStepLevelTransientUserData(java.lang.Object obj)
Set the transient user data stored in this context for this step
|
|
setUserAccountingId(java.lang.String o)
Deprecated. This interface will likely be removed in a future release.
|
|
setUserControlledTransaction(com.ibm.batch.spi.IUserControlledTransaction uTran)
|
|
setUserData(java.lang.Object o)
Deprecated. Please use setStepLevelTransientUserData API instead.
|
|
setUserException(java.lang.Object o)
Exceptions thrown while executing user code can be saved in the context
using this method
|
Methods inherited from class com.ibm.ws.batch.context.JobStepContextBase |
---|
clearRecordMetrics, getPOJOStep, getProperties, getRecordMetrics, getRetryHandler, isReturnCodeSet, serializeRecordMetrics, serializeStepLevelData, setIsReturnCodeSet, setJobID, setJobLevelProperties, setJobListenerProperties, setPOJOStep, setProperties, setRecordMetrics, setRecordMetricsFromBlob, setRetryHandler, setSharedSQLConnection, setStepID, setStepLevelDataFromBlob, setStepLevelDataFromBlob, setStepMetrics, setSubmitterID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
JobStepContext
- public JobStepContext()
Method Detail
getUserControlledTransaction
- public com.ibm.batch.spi.IUserControlledTransaction getUserControlledTransaction( )
Specified by:
getUserControlledTransaction
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getUserControlledTransaction
in class com.ibm.ws.batch.context.JobStepContextBase
setUserControlledTransaction
- public void setUserControlledTransaction( com.ibm.batch.spi.IUserControlledTransaction uTran)
Overrides:
setUserControlledTransaction
in class com.ibm.ws.batch.context.JobStepContextBase
getUserData
- @Deprecated
- public java.lang.Object getUserData( )
Deprecated. Please use getStepLevelTransientUserData API instead.
Returns the user data stored in this context.
Specified by:
getUserData
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getUserData
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
user data object
setUserData
- @Deprecated
- public void setUserData( java.lang.Object o)
Deprecated. Please use setStepLevelTransientUserData API instead.
Set user data object in this context.
Specified by:
setUserData
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
setUserData
in class com.ibm.ws.batch.context.JobStepContextBase
getJobID
- public java.lang.String getJobID( )
Returns job name of current job.
Specified by:
getJobID
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getJobID
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
job name
getStepID
- public java.lang.String getStepID( )
Returns step name of current step.
Specified by:
getStepID
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getStepID
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
step name
getJobStepID
- public JobStepID getJobStepID()
Returns JobStepID object for current step. This object is required to retrieve batch data stream objects from the
BatchDataStreamMgr.
Specified by:
getJobStepID
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getJobStepID
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
JobStepID for this job step.
getUserException
- public java.lang.Object getUserException( )
Return any exception thrown during processJobStep saved by the runtime
Specified by:
getUserException
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getUserException
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
setUserException
- public void setUserException(java.lang.Object o)
Exceptions thrown while executing user code can be saved in the context
using this method
Overrides:
setUserException
in class com.ibm.ws.batch.context.JobStepContextBase
Parameters:
o
- getReturnCode
- public int getReturnCode()
Return the return code explicitly set by the user using setReturnCode.
This return code overrides the one returned by destroyJobStep for batch jobs
Specified by:
getReturnCode
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getReturnCode
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
setReturnCode
- public void setReturnCode(int rc)
To be used mainly by CI jobs to communicate return code back to the caller.
Specified by:
setReturnCode
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
setReturnCode
in class com.ibm.ws.batch.context.JobStepContextBase
Parameters:
rc
- getUserAccountingId
- public java.lang.String getUserAccountingId( )
Return the accounting id set by the user in the submitted xJCL
Specified by:
getUserAccountingId
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getUserAccountingId
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
setUserAccountingId
- @Deprecated
- public void setUserAccountingId( java.lang.String o)
Deprecated. This interface will likely be removed in a future release.
set the accountingId passed via xJCL onto the context
using this method
Overrides:
setUserAccountingId
in class com.ibm.ws.batch.context.JobStepContextBase
Parameters:
o
- getJobListenerProperties
- public java.util.Properties getJobListenerProperties( )
Return the job-level properties object
Specified by:
getJobListenerProperties
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getJobListenerProperties
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
properties object
getJobLevelUserData
- @Deprecated
- public java.lang.Object getJobLevelUserData( )
Deprecated. Please use getJobLevelTransientUserData APIs instead.
Return the transient job-level user data object
Specified by:
getJobLevelUserData
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getJobLevelUserData
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
user data object
setJobLevelUserData
- @Deprecated
- public void setJobLevelUserData( java.lang.Object o)
Deprecated. Please use setJobLevelTransientUserData API instead.
Sets the transient job-level user data object
Specified by:
setJobLevelUserData
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
setJobLevelUserData
in class com.ibm.ws.batch.context.JobStepContextBase
getStepLevelPersistentData
- @Deprecated
- public java.io.Externalizable getStepLevelPersistentData( )
Deprecated. Please use getJobLevelPersistentUserData API instead.
Return the persistent step-level user data object
Specified by:
getStepLevelPersistentData
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getStepLevelPersistentData
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
persistent step-level user data object
setStepLevelPersistentData
- @Deprecated
- public void setStepLevelPersistentData( java.io.Externalizable o)
Deprecated. Please use setJobLevelPesistentUserData API instead.
Sets the persistent step-level user data object
Specified by:
setStepLevelPersistentData
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
setStepLevelPersistentData
in class com.ibm.ws.batch.context.JobStepContextBase
getStepMetrics
- public StepMetrics getStepMetrics( )
Return the step-level metrics (time and retry)
Specified by:
getStepMetrics
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getStepMetrics
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
StepMetrics
getRecordMetrics
- public RecordMetrics getRecordMetrics( java.lang.String bdsname)
Return the bds-level metrics (skip and records per second)
Specified by:
getRecordMetrics
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getRecordMetrics
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
RecordMetrics
addRetryListener
- public void addRetryListener(RetryListener retryListener)
Specified by:
addRetryListener
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
addRetryListener
in class com.ibm.ws.batch.context.JobStepContextBase
getJobLevelProperties
- public java.util.Properties getJobLevelProperties( )
Specified by:
getJobLevelProperties
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getJobLevelProperties
in class com.ibm.ws.batch.context.JobStepContextBase
getSharedSQLConnection
- public java.sql.Connection getSharedSQLConnection( )
Specified by:
getSharedSQLConnection
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getSharedSQLConnection
in class com.ibm.ws.batch.context.JobStepContextBase
getJobLevelTransientUserData
- public java.lang.Object getJobLevelTransientUserData( )
Return the transient job-level user data object for this job
Returns:
user data object
setJobLevelTransientUserData
- public void setJobLevelTransientUserData( java.lang.Object obj)
Set the transient job-level user data object for this job
getStepLevelTransientUserData
- public java.lang.Object getStepLevelTransientUserData( )
Returns the transient user data stored in this context for this step
Returns:
user data object
setStepLevelTransientUserData
- public void setStepLevelTransientUserData( java.lang.Object obj)
Set the transient user data stored in this context for this step
getJobLevelPersistentUserData
- public java.io.Externalizable getJobLevelPersistentUserData( )
Return the persistent job-level user data object for this job
Returns:
persistent job-level user data object
setJobLevelPersistentUserData
- public void setJobLevelPersistentUserData( java.io.Externalizable ext)
Return the persistent job-level user data object for this job
getSubmitterID
- public java.lang.String getSubmitterID( )
Return the user id of the user who submits this job
Specified by:
getSubmitterID
in interface com.ibm.batch.api.context.JobStepContext
Overrides:
getSubmitterID
in class com.ibm.ws.batch.context.JobStepContextBase
Returns:
persistent job-level user data object