List of usage examples for org.springframework.web.context.request DestructionCallbackBindingListener DestructionCallbackBindingListener
public DestructionCallbackBindingListener(Runnable destructionCallback)
From source file:org.springframework.web.context.request.ServletRequestAttributes.java
/** * Register the given callback as to be executed after session termination. * @param name the name of the attribute to register the callback for * @param callback the callback to be executed for destruction *///from w w w . ja v a 2 s. com private void registerSessionDestructionCallback(String name, Runnable callback) { HttpSession session = getSession(true); session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, new DestructionCallbackBindingListener(callback)); }