public class JobOperatorService extends Object implements javax.batch.operations.JobOperator, org.jboss.msc.service.Service<javax.batch.operations.JobOperator>
Note that for each method the job name, or derived job name, must exist for the deployment. The allowed job names and job XML files are determined at deployment time.
This implementation does change some of the API's contracts however it's only intended to be used by management resources and operations. Limits the interaction with the jobs to the scope of the deployments jobs. Any behavioral change will be documented.
| Constructor and Description |
|---|
JobOperatorService() |
| Modifier and Type | Method and Description |
|---|---|
void |
abandon(long executionId) |
protected void |
addAllowedJob(String jobXml,
String jobName)
Adds the job XML and the job name to the allowed resources to use.
|
javax.batch.runtime.JobExecution |
getJobExecution(long executionId) |
List<javax.batch.runtime.JobExecution> |
getJobExecutions(javax.batch.runtime.JobInstance instance) |
javax.batch.runtime.JobInstance |
getJobInstance(long executionId) |
int |
getJobInstanceCount(String jobName) |
List<javax.batch.runtime.JobInstance> |
getJobInstances(String jobName,
int start,
int count) |
Set<String> |
getJobNames() |
Properties |
getParameters(long executionId) |
List<Long> |
getRunningExecutions(String jobName) |
List<javax.batch.runtime.StepExecution> |
getStepExecutions(long jobExecutionId) |
javax.batch.operations.JobOperator |
getValue() |
long |
restart(long executionId,
Properties restartParameters) |
void |
start(org.jboss.msc.service.StartContext context) |
long |
start(String jobXMLName,
Properties jobParameters) |
void |
stop(long executionId) |
void |
stop(org.jboss.msc.service.StopContext context) |
public void start(org.jboss.msc.service.StartContext context)
throws org.jboss.msc.service.StartException
start in interface org.jboss.msc.service.Service<javax.batch.operations.JobOperator>org.jboss.msc.service.StartExceptionpublic void stop(org.jboss.msc.service.StopContext context)
stop in interface org.jboss.msc.service.Service<javax.batch.operations.JobOperator>public javax.batch.operations.JobOperator getValue()
throws IllegalStateException,
IllegalArgumentException
getValue in interface org.jboss.msc.value.Value<javax.batch.operations.JobOperator>IllegalStateExceptionIllegalArgumentExceptionpublic Set<String> getJobNames() throws javax.batch.operations.JobSecurityException
getJobNames in interface javax.batch.operations.JobOperatorjavax.batch.operations.JobSecurityExceptionpublic int getJobInstanceCount(String jobName) throws javax.batch.operations.NoSuchJobException, javax.batch.operations.JobSecurityException
This does not throw a NoSuchJobException if the repository does not contain the
job, but the job is allowed. If this case is true then 0 is returned.
getJobInstanceCount in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExceptionjavax.batch.operations.JobSecurityExceptionpublic List<javax.batch.runtime.JobInstance> getJobInstances(String jobName, int start, int count) throws javax.batch.operations.NoSuchJobException, javax.batch.operations.JobSecurityException
This does not throw a NoSuchJobException if the repository does not contain the
job, but the job is allowed. If this case is true an empty list is returned.
getJobInstances in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExceptionjavax.batch.operations.JobSecurityExceptionpublic List<Long> getRunningExecutions(String jobName) throws javax.batch.operations.NoSuchJobException, javax.batch.operations.JobSecurityException
This does not throw a NoSuchJobException if the repository does not contain the
job, but the job is allowed. If this case is true an empty list is returned.
getRunningExecutions in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExceptionjavax.batch.operations.JobSecurityExceptionpublic Properties getParameters(long executionId) throws javax.batch.operations.NoSuchJobExecutionException, javax.batch.operations.JobSecurityException
getParameters in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobSecurityExceptionpublic long start(String jobXMLName, Properties jobParameters) throws javax.batch.operations.JobStartException, javax.batch.operations.JobSecurityException
start in interface javax.batch.operations.JobOperatorjavax.batch.operations.JobStartExceptionjavax.batch.operations.JobSecurityExceptionpublic long restart(long executionId,
Properties restartParameters)
throws javax.batch.operations.JobExecutionAlreadyCompleteException,
javax.batch.operations.NoSuchJobExecutionException,
javax.batch.operations.JobExecutionNotMostRecentException,
javax.batch.operations.JobRestartException,
javax.batch.operations.JobSecurityException
restart in interface javax.batch.operations.JobOperatorjavax.batch.operations.JobExecutionAlreadyCompleteExceptionjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobExecutionNotMostRecentExceptionjavax.batch.operations.JobRestartExceptionjavax.batch.operations.JobSecurityExceptionpublic void stop(long executionId)
throws javax.batch.operations.NoSuchJobExecutionException,
javax.batch.operations.JobExecutionNotRunningException,
javax.batch.operations.JobSecurityException
stop in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobExecutionNotRunningExceptionjavax.batch.operations.JobSecurityExceptionpublic void abandon(long executionId)
throws javax.batch.operations.NoSuchJobExecutionException,
javax.batch.operations.JobExecutionIsRunningException,
javax.batch.operations.JobSecurityException
abandon in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobExecutionIsRunningExceptionjavax.batch.operations.JobSecurityExceptionpublic javax.batch.runtime.JobInstance getJobInstance(long executionId)
throws javax.batch.operations.NoSuchJobExecutionException,
javax.batch.operations.JobSecurityException
getJobInstance in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobSecurityExceptionpublic List<javax.batch.runtime.JobExecution> getJobExecutions(javax.batch.runtime.JobInstance instance) throws javax.batch.operations.NoSuchJobInstanceException, javax.batch.operations.JobSecurityException
getJobExecutions in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobInstanceExceptionjavax.batch.operations.JobSecurityExceptionpublic javax.batch.runtime.JobExecution getJobExecution(long executionId)
throws javax.batch.operations.NoSuchJobExecutionException,
javax.batch.operations.JobSecurityException
getJobExecution in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobSecurityExceptionpublic List<javax.batch.runtime.StepExecution> getStepExecutions(long jobExecutionId) throws javax.batch.operations.NoSuchJobExecutionException, javax.batch.operations.JobSecurityException
getStepExecutions in interface javax.batch.operations.JobOperatorjavax.batch.operations.NoSuchJobExecutionExceptionjavax.batch.operations.JobSecurityExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.