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