com.ibm.websphere.batch
Class JobInfo

java.lang.Object
  extended by com.ibm.websphere.batch.JobInfo
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class JobInfo
extends java.lang.Object
implements java.io.Externalizable

This information object contains job status and job usage data. Based on when this JobInfo object is fetched for a job in its lifecycle, certain fields will have the default values.

For jobs that are in submitted state, only the following methods are useful and the rest provides the default values:

For jobs in executing or suspended state, the following methods provide useful information and the rest will provide the default values: For jobs in final state all the methods will provide the latest information. You can call the following additional methods on JobInfo object when the jobs are in final state:

See Also:
Serialized Form

Constructor Summary
JobInfo()
           
 
Method Summary
 java.lang.String getAccountingId()
          Accounting identity that would be charged for the resource utilized by this job.
 long getCPUConsumed()
          CPU consumed by the job in nanseconds.
 java.lang.String getEndpointName()
          Name of the endpoint where the job is dispatched to and processed.
 java.lang.String getEndTime()
          Clock time on the endpoint when this job reached a final state.
 java.lang.String getJobId()
          The identity of the job.
 java.lang.String getJobType()
          Type of the job.
 int getRC()
          Return code of the job.
 java.lang.String getStartTime()
          Clock time on the endpoint when the job was dispatched to and started processing.
 int getStatus()
          Status of this job in int format.
 java.lang.String getStatusText()
          Status of this job in text format.
 java.lang.String getSubmitterId()
          The identity of the submitter of this job.
 java.lang.String getSuspendedUntil()
          Gets the clock time until which this job will remain in suspended state.
 void readExternal(java.io.ObjectInput in)
           
 void setAccountingId(java.lang.String accountingId)
           
 void setCPUConsumed(long cpuConsumed)
           
 void setEndpointName(java.lang.String endpointName)
           
 void setEndTime(java.lang.String endTime)
           
 void setJobId(java.lang.String jobId)
           
 void setJobType(java.lang.String jobType)
           
 void setRC(int rc)
           
 void setStartTime(java.lang.String startTime)
           
 void setStatus(int status)
           
 void setStatusText(java.lang.String statusText)
           
 void setSubmitterId(java.lang.String submitterId)
           
 void setSuspendedUntil(java.lang.String suspendedUntil)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobInfo

public JobInfo()
Method Detail

getJobId

public java.lang.String getJobId()
The identity of the job. This is the id that is returned on successful job submissions.

Returns:
the identity of this Job

setJobId

public void setJobId(java.lang.String jobId)

getSubmitterId

public java.lang.String getSubmitterId()
The identity of the submitter of this job. This is "user id" that was used during job submission.

Returns:
the identity of the submitter of this job

setSubmitterId

public void setSubmitterId(java.lang.String submitterId)

getJobType

public java.lang.String getJobType()
Type of the job. Batch - for transactional batch; Grid - for compute intensive or; GridUtility - for native execution.

Returns:
the type of this job

setJobType

public void setJobType(java.lang.String jobType)

getStatus

public int getStatus()
Status of this job in int format.

Returns:
the status of this job
See Also:
JobStatusConstants

setStatus

public void setStatus(int status)

getStatusText

public java.lang.String getStatusText()
Status of this job in text format.

Returns:
the status of the job in text format

setStatusText

public void setStatusText(java.lang.String statusText)

getEndpointName

public java.lang.String getEndpointName()
Name of the endpoint where the job is dispatched to and processed. For transactional batch and compute intensive jobs this will be application servers. For native execution jobs this will be middleware servers. Until an endpoint is selected for this job and dispatched, this field will be null.

Returns:
the name of the endpoint which processed this job

setEndpointName

public void setEndpointName(java.lang.String endpointName)

getStartTime

public java.lang.String getStartTime()
Clock time on the endpoint when the job was dispatched to and started processing. Until a job is dispatched to an endpoint, clock time will be null.

Returns:
the clock time when this job was started on an endpoint

setStartTime

public void setStartTime(java.lang.String startTime)

getSuspendedUntil

public java.lang.String getSuspendedUntil()
Gets the clock time until which this job will remain in suspended state.


setSuspendedUntil

public void setSuspendedUntil(java.lang.String suspendedUntil)

getEndTime

public java.lang.String getEndTime()
Clock time on the endpoint when this job reached a final state. Until a job reaches a final state on an endpoint, clock time will be null.

Returns:
clock time when this job ended on an endpoint

setEndTime

public void setEndTime(java.lang.String endTime)

getRC

public int getRC()
Return code of the job. Negative return codes are provided by the container. Zero or positive return code is provided by the application. The default is 0 until the job reaches a final state and then this field is changed to appropriate status. You should always use the status along with return code as the return code by itself will not provide the exact information.

Returns:
the return code of the job.

setRC

public void setRC(int rc)

getAccountingId

public java.lang.String getAccountingId()
Accounting identity that would be charged for the resource utilized by this job.

Returns:
the accounting identity of this job.

setAccountingId

public void setAccountingId(java.lang.String accountingId)

getCPUConsumed

public long getCPUConsumed()
CPU consumed by the job in nanseconds.

Returns:
CPU unit in int consumed by this job on the endpoint

setCPUConsumed

public void setCPUConsumed(long cpuConsumed)

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException