public class JsrTestUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static javax.batch.runtime.Metric |
getMetric(javax.batch.runtime.StepExecution stepExecution,
javax.batch.runtime.Metric.MetricType type) |
static javax.batch.runtime.JobExecution |
restartJob(long executionId,
java.util.Properties properties,
long timeout)
Restarts a job and waits for it's status to be any of
BatchStatus.STOPPED,
BatchStatus.COMPLETED, or BatchStatus.FAILED. |
static javax.batch.runtime.JobExecution |
runJob(java.lang.String jobName,
java.util.Properties properties,
long timeout)
Executes a job and waits for it's status to be any of
BatchStatus.STOPPED,
BatchStatus.COMPLETED, or BatchStatus.FAILED. |
public static javax.batch.runtime.JobExecution runJob(java.lang.String jobName,
java.util.Properties properties,
long timeout)
throws java.util.concurrent.TimeoutException
BatchStatus.STOPPED,
BatchStatus.COMPLETED, or BatchStatus.FAILED. If the job does not
reach one of those statuses within the given timeout, a TimeoutException is
thrown.jobName - the name of the job.properties - job parameters to be associated with the job.timeout - maximum amount of time to wait in milliseconds.JobExecution for the final state of the jobjava.util.concurrent.TimeoutException - if the timeout occurspublic static javax.batch.runtime.JobExecution restartJob(long executionId,
java.util.Properties properties,
long timeout)
throws java.util.concurrent.TimeoutException
BatchStatus.STOPPED,
BatchStatus.COMPLETED, or BatchStatus.FAILED. If the job does not
reach one of those statuses within the given timeout, a TimeoutException is
thrown.executionId - the id of the job execution to restart.properties - job parameters to be associated with the job.timeout - maximum amount of time to wait in milliseconds.JobExecution for the final state of the jobjava.util.concurrent.TimeoutException - if the timeout occurspublic static javax.batch.runtime.Metric getMetric(javax.batch.runtime.StepExecution stepExecution,
javax.batch.runtime.Metric.MetricType type)