Package org.springframework.web.context.request

# Class DestructionCallbackBindingListener

java.lang.Object
org.springframework.web.context.request.DestructionCallbackBindingListener

All Implemented Interfaces:
  `HttpSessionBindingListener`, `Serializable`, `EventListener`

public class DestructionCallbackBindingListener extends Object implements HttpSessionBindingListener, Serializable
Adapter that implements the Servlet HttpSessionBindingListener interface, wrapping a session destruction callback.

Since:
  3.0
Author:
  Juergen Hoeller
See Also:
  - `RequestAttributes.registerDestructionCallback(java.lang.String, java.lang.Runnable, int)`
  - `ServletRequestAttributes.registerSessionDestructionCallback(java.lang.String, java.lang.Runnable)`
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`DestructionCallbackBindingListener(Runnable destructionCallback)`
Create a new DestructionCallbackBindingListener for the given callback.

## Method Summary

Modifier and Type
Method
Description
`void`
`valueBound(HttpSessionBindingEvent event)`
`void`
`valueUnbound(HttpSessionBindingEvent event)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DestructionCallbackBindingListener

public DestructionCallbackBindingListener(Runnable destructionCallback)
Create a new DestructionCallbackBindingListener for the given callback.

Parameters:
  `destructionCallback` - the Runnable to execute when this listener object gets unbound from the session

## Method Details

### valueBound

public void valueBound(HttpSessionBindingEvent event)

Specified by:
  `valueBound` in interface `HttpSessionBindingListener`

### valueUnbound

public void valueUnbound(HttpSessionBindingEvent event)

Specified by:
  `valueUnbound` in interface `HttpSessionBindingListener`