public class JobContextImpl extends AbstractContext implements javax.batch.runtime.context.JobContext, Cloneable
classLoader, id, outerContexts, transientUserData
Constructor and Description |
---|
JobContextImpl(JobExecutionImpl jobExecution,
JobExecutionImpl originalToRestart,
ArtifactFactory artifactFactory,
JobRepository jobRepository,
BatchEnvironment batchEnvironment) |
addToContextArray, getClassLoader, getId, getTransientUserData, setTransientUserData
public JobContextImpl(JobExecutionImpl jobExecution, JobExecutionImpl originalToRestart, ArtifactFactory artifactFactory, JobRepository jobRepository, BatchEnvironment batchEnvironment)
public JobContextImpl clone()
clone
in class AbstractContext
public boolean isRestart()
public ArtifactFactory getArtifactFactory()
public javax.batch.api.listener.JobListener[] getJobListeners()
public Properties getJobParameters()
public AbstractContext[] getOuterContexts()
getOuterContexts
in class AbstractContext
public String getJobName()
getJobName
in interface javax.batch.runtime.context.JobContext
public long getInstanceId()
getInstanceId
in interface javax.batch.runtime.context.JobContext
public long getExecutionId()
getExecutionId
in interface javax.batch.runtime.context.JobContext
public Properties getProperties()
getProperties
in interface javax.batch.runtime.context.JobContext
public javax.batch.runtime.BatchStatus getBatchStatus()
getBatchStatus
in interface javax.batch.runtime.context.JobContext
getBatchStatus
in class AbstractContext
public String getExitStatus()
getExitStatus
in interface javax.batch.runtime.context.JobContext
getExitStatus
in class AbstractContext
public void setBatchStatus(javax.batch.runtime.BatchStatus status)
setBatchStatus
in class AbstractContext
public void setExitStatus(String status)
setExitStatus
in interface javax.batch.runtime.context.JobContext
setExitStatus
in class AbstractContext
public JobContextImpl getJobContext()
getJobContext
in class AbstractContext
public JobExecutionImpl getJobExecution()
public Job getJob()
public JobRepository getJobRepository()
public BatchArtifacts getBatchArtifacts()
public BatchEnvironment getBatchEnvironment()
public <A> A createArtifact(String ref, Class<?> cls, Properties props, StepContextImpl... stepContextForInjection)
ref
- ref name of the artifactcls
- the class type of the target artifact. Either ref or cls may be specified.props
- batch properties directly for the artifact to create (does not include any properties from upper enclosing levels)stepContextForInjection
- optional StepContext, needed for step-level artifact, but not for non-step-level onespublic void destroyArtifact(Object... objs)
public void destroyArtifact(List<?> list)
Copyright © 2014 JBoss by Red Hat. All rights reserved.