Class HttpSessionBindingEvent

  • All Implemented Interfaces:
    Serializable

    public class HttpSessionBindingEvent
    extends javax.servlet.http.HttpSessionBindingEvent
    Optimized extension of the HttpSessionBindingEvent class that delegates to an AttributeHolder to obtain the value associated with the event.
    Author:
    jh 2009.05.05
    See Also:
    Serialized Form
    • Field Detail

      • m_holder

        protected AttributeHolder m_holder
        An AttributeHolder that can be used to retrieve the value of the attribute that has been added, removed or replaced.
    • Constructor Detail

      • HttpSessionBindingEvent

        public HttpSessionBindingEvent​(javax.servlet.http.HttpSession session,
                                       String sName,
                                       AttributeHolder holder)
        Constructs an event that notifies an object that it has been bound to or unbound from a session.
        Parameters:
        session - the session to which the object is bound or unbound
        sName - the name with which the object is bound or unbound
        holder - an AttributeHolder that can be used to retrieve the value of the attribute that has been added, removed or replaced; see #getValue
    • Method Detail

      • getValue

        public Object getValue()
        Returns the value of the attribute that has been added, removed or replaced. If the attribute was added (or bound), this is the value of the attribute. If the attribute was removed (or unbound), this is the value of the removed attribute. If the attribute was replaced, this is the old value of the attribute.
        Overrides:
        getValue in class javax.servlet.http.HttpSessionBindingEvent
        Returns:
        the value associated with this event