Class DestructionCallbackBindingListener
- java.lang.Object
- org.springframework.web.context.request.DestructionCallbackBindingListener
- All Implemented Interfaces:
Serializable
,EventListener
,HttpSessionBindingListener
public class DestructionCallbackBindingListener extends Object implements HttpSessionBindingListener, Serializable
Adapter that implements the Servlet HttpSessionBindingListener interface, wrapping a session destruction callback.
Constructor Summary
Constructors Constructor Description DestructionCallbackBindingListener(Runnable destructionCallback)
Create a new DestructionCallbackBindingListener for the given callback.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
valueBound(HttpSessionBindingEvent event)
Notifies the object that it is being bound to a session and identifies the session.void
valueUnbound(HttpSessionBindingEvent event)
Notifies the object that it is being unbound from a session and identifies the session.
Constructor Detail
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 Detail
valueBound
public void valueBound(HttpSessionBindingEvent event)
Description copied from interface:javax.servlet.http.HttpSessionBindingListener
Notifies the object that it is being bound to a session and identifies the session.- Specified by:
valueBound
in interfaceHttpSessionBindingListener
- Parameters:
event
- the event that identifies the session- See Also:
HttpSessionBindingListener.valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
valueUnbound
public void valueUnbound(HttpSessionBindingEvent event)
Description copied from interface:javax.servlet.http.HttpSessionBindingListener
Notifies the object that it is being unbound from a session and identifies the session.- Specified by:
valueUnbound
in interfaceHttpSessionBindingListener
- Parameters:
event
- the event that identifies the session- See Also:
HttpSessionBindingListener.valueBound(javax.servlet.http.HttpSessionBindingEvent)