|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.repeat.context.SynchronizedAttributeAccessor org.springframework.batch.core.scope.context.StepContext
public class StepContext
Simple implementation of StepContext
.
Constructor Summary | |
---|---|
StepContext(StepExecution stepExecution)
Create a new instance of StepContext for this
StepExecution . |
Method Summary | |
---|---|
void |
close()
Clean up the context at the end of a step execution. |
boolean |
equals(Object other)
Extend the base class method to include the step execution itself as a key (i.e. two contexts are only equal if their step executions are the same). |
String |
getId()
|
Map<String,Object> |
getJobExecutionContext()
|
String |
getJobName()
Convenient accessor for current job name identifier. |
Map<String,Object> |
getJobParameters()
|
StepExecution |
getStepExecution()
|
Map<String,Object> |
getStepExecutionContext()
|
String |
getStepName()
Convenient accessor for current step name identifier. |
Properties |
getSystemProperties()
Convenient accessor for System properties to make it easy to access them from placeholder expressions. |
int |
hashCode()
Overrides the default behaviour to provide a hash code based only on the step execution. |
void |
registerDestructionCallback(String name,
Runnable callback)
Allow clients to register callbacks for clean up on close. |
Object |
removeAttribute(String name)
Override base class behaviour to ensure destruction callbacks are unregistered as well as the default behaviour. |
String |
toString()
|
Methods inherited from class org.springframework.batch.repeat.context.SynchronizedAttributeAccessor |
---|
attributeNames, getAttribute, hasAttribute, setAttribute, setAttributeIfAbsent |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StepContext(StepExecution stepExecution)
StepContext
for this
StepExecution
.
stepExecution
- a step executionMethod Detail |
---|
public String getStepName()
StepExecution
public String getJobName()
JobInstance
associated with the current StepExecution
public Properties getSystemProperties()
public Map<String,Object> getStepExecutionContext()
ExecutionContext
public Map<String,Object> getJobExecutionContext()
ExecutionContext
public Map<String,Object> getJobParameters()
JobParameters
public void registerDestructionCallback(String name, Runnable callback)
name
- the callback id (unique attribute key in this context)callback
- a callback to execute on closepublic Object removeAttribute(String name)
removeAttribute
in interface AttributeAccessor
removeAttribute
in class SynchronizedAttributeAccessor
SynchronizedAttributeAccessor.removeAttribute(String)
public void close()
StepScope
.
public StepExecution getStepExecution()
public String getId()
public boolean equals(Object other)
equals
in class SynchronizedAttributeAccessor
SynchronizedAttributeAccessor.equals(Object)
public int hashCode()
hashCode
in class SynchronizedAttributeAccessor
SynchronizedAttributeAccessor.hashCode()
public String toString()
toString
in class SynchronizedAttributeAccessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |