Example usage for javax.servlet.http HttpSessionBindingEvent HttpSessionBindingEvent

List of usage examples for javax.servlet.http HttpSessionBindingEvent HttpSessionBindingEvent

Introduction

In this page you can find the example usage for javax.servlet.http HttpSessionBindingEvent HttpSessionBindingEvent.

Prototype

public HttpSessionBindingEvent(HttpSession session, String name, Object value) 

Source Link

Document

Constructs an event that notifies an object that it has been bound to or unbound from a session.

Usage

From source file:org.springframework.session.web.http.HttpSessionAdapter.java

@Override
public void removeAttribute(String name) {
    checkState();/*from w w w  .  ja  va2  s. com*/
    Object oldValue = this.session.getAttribute(name);
    this.session.removeAttribute(name);
    if (oldValue instanceof HttpSessionBindingListener) {
        try {
            ((HttpSessionBindingListener) oldValue)
                    .valueUnbound(new HttpSessionBindingEvent(this, name, oldValue));
        } catch (Throwable th) {
            logger.error("Error invoking session binding event listener", th);
        }
    }
}