Spring Framework DestructionCallbackBindingListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DestructionCallbackBindingListener class.

This code example shows how to use the following methods:
	 * @param name the name of the attribute to register the callback for 
	 * @param callback the callback to be executed for destruction 
	 */ 
	protected void registerSessionDestructionCallback(String name, Runnable callback) {
		PortletSession session = getSession(true);
		session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name,
				new DestructionCallbackBindingListener(callback));
	} 
 
 
	@Override 
	public String toString() {
		return this.request.toString();
	} 
 
} 
6
CodeRank