public class JobScope extends BatchScopeSupport
JobContext
using #{..} placeholders. Using this feature,
bean properties can be pulled from the job or job execution context and the
job parameters. E.g.
<bean id="..." class="..." scope="job"> <property name="name" value="#{jobParameters[input]}" /> </bean> <bean id="..." class="..." scope="job"> <property name="name" value="#{jobExecutionContext['input.stem']}.txt" /> </bean>The
JobContext
is referenced using standard bean property paths (as
per BeanWrapper
). The examples above all show the use of the Map
accessors provided as a convenience for job attributes.StepScope
), Michael MinellaBatchScopeSupport.Scopifier
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_KEY
Context key for clients to use for conversation identifier.
|
Constructor and Description |
---|
JobScope() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String name,
org.springframework.beans.factory.ObjectFactory<?> objectFactory) |
java.lang.String |
getConversationId() |
java.lang.String |
getTargetNamePrefix() |
void |
registerDestructionCallback(java.lang.String name,
java.lang.Runnable callback) |
java.lang.Object |
remove(java.lang.String name) |
java.lang.Object |
resolveContextualObject(java.lang.String key)
This will be used to resolve expressions in job-scoped beans.
|
createScopedProxy, getName, getOrder, postProcessBeanFactory, setAutoProxy, setName, setOrder, setProxyTargetClass
public static final java.lang.String ID_KEY
public java.lang.Object resolveContextualObject(java.lang.String key)
public java.lang.Object get(java.lang.String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
Scope.get(String, ObjectFactory)
public java.lang.String getConversationId()
Scope.getConversationId()
public void registerDestructionCallback(java.lang.String name, java.lang.Runnable callback)
Scope.registerDestructionCallback(String, Runnable)
public java.lang.Object remove(java.lang.String name)
Scope.remove(String)
public java.lang.String getTargetNamePrefix()
getTargetNamePrefix
in class BatchScopeSupport