List of usage examples for org.springframework.batch.core.scope.context StepContext registerDestructionCallback
public void registerDestructionCallback(String name, Runnable callback)
From source file:org.springframework.batch.core.scope.StepScope.java
/** * @see Scope#registerDestructionCallback(String, Runnable) *///from www . j a va 2 s . c om @Override public void registerDestructionCallback(String name, Runnable callback) { StepContext context = getContext(); if (logger.isDebugEnabled()) { logger.debug( String.format("Registered destruction callback in scope=%s, name=%s", this.getName(), name)); } context.registerDestructionCallback(name, callback); }