com.equilibrium.util.api
Class MGBatchStatusResponse

java.lang.Object
  extended by com.equilibrium.util.api.MGResponse
      extended by com.equilibrium.util.api.MGBatchStatusResponse

public class MGBatchStatusResponse
extends MGResponse

MediaGenerator response with information about the specified batch.


Field Summary
static int JOB_IS_ERROR
          define response value for getBatchJobStatus
static int JOB_IS_PENDING
          define response value for getBatchJobStatus
static int JOB_IS_SUCCESS
          define response value for getBatchJobStatus
 
Method Summary
 boolean getAborted()
          Return true if the batch is aborted.
 java.lang.String getBatchInfo()
          Return the BatchInfo field of the batch status.
 java.lang.String[] getBatchJobErrors()
          Return a list of error strings, one for each job in the batch.
 java.lang.String[] getBatchJobExecutingStatus()
          Return a list of executing status strings, one for each job in the batch.
 int[] getBatchJobStatus()
          Return the status for each job of the batch.
 java.lang.String getBatchName()
          Return the BatchName field of the batch status.
 boolean getDone()
          Return true if the job has completed.
 int getErrored()
          Return the number of jobs generating script errors
 boolean getExecuting()
          Return true if the batch is executing.
 boolean getOpen()
          Return true if the batch request is still open (i.e., commit has not been called.)
 int getSubmitted()
          Return the number of jobs submitted.
 int getSucceeded()
          Return the number of jobs that succeeded.
 boolean getTracked()
          Return true if the media generator knows about this batch.
 
Methods inherited from class com.equilibrium.util.api.MGResponse
discard, getContentKey, getContentLength, getContentMimeType, getDoubleParam, getHttpHeader, getHttpHeaders, getIntArrayParam, getIntParam, getLongParam, getParam, getParameters, getResponsePath, getStatusCode, getTextResponse, hasContent, readContent, streamResponse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOB_IS_ERROR

public static final int JOB_IS_ERROR
define response value for getBatchJobStatus

See Also:
Constant Field Values

JOB_IS_PENDING

public static final int JOB_IS_PENDING
define response value for getBatchJobStatus

See Also:
Constant Field Values

JOB_IS_SUCCESS

public static final int JOB_IS_SUCCESS
define response value for getBatchJobStatus

See Also:
Constant Field Values
Method Detail

getExecuting

public boolean getExecuting()
Return true if the batch is executing.


getAborted

public boolean getAborted()
Return true if the batch is aborted.


getTracked

public boolean getTracked()
Return true if the media generator knows about this batch. If getTracked returns false, then the MediaGenerator has forgotten about this batch and all the other status methods will return 0.

Returns:
true if the batch job is being tracked.

getDone

public boolean getDone()
Return true if the job has completed.

Returns:
true if the batch job is done.

getSubmitted

public int getSubmitted()
                 throws MGException
Return the number of jobs submitted.

Returns:
the number of jobs submitted in the batch.
Throws:
MGException

getSucceeded

public int getSucceeded()
                 throws MGException
Return the number of jobs that succeeded.

Returns:
the number of jobs that have succeeded.
Throws:
MGException

getErrored

public int getErrored()
               throws MGException
Return the number of jobs generating script errors

Returns:
the number of jobs that had errors.
Throws:
MGException

getOpen

public boolean getOpen()
Return true if the batch request is still open (i.e., commit has not been called.)

Returns:
true if the batch is still open.

getBatchName

public java.lang.String getBatchName()
Return the BatchName field of the batch status. This field contains the string set as the batch name when the batch was submitted.

Returns:
the batch name.

getBatchInfo

public java.lang.String getBatchInfo()
Return the BatchInfo field of the batch status. This field contains the string set using setBatchInfo.

Returns:
the string specified by setBatchInfo when the batch was committed.

getBatchJobStatus

public int[] getBatchJobStatus()
Return the status for each job of the batch. The response is a list of integers, where -1 indicates error, 0 indicates not processed, and 1 indicates success.

Returns:
list of job status

getBatchJobErrors

public java.lang.String[] getBatchJobErrors()
                                     throws java.io.IOException
Return a list of error strings, one for each job in the batch.

Returns:
list of job error strings
Throws:
java.io.IOException

getBatchJobExecutingStatus

public java.lang.String[] getBatchJobExecutingStatus()
                                              throws java.io.IOException
Return a list of executing status strings, one for each job in the batch.

Returns:
list of job error strings
Throws:
java.io.IOException