HttpSessionEvent (Servlet 4.0 API Documentation - Apache Tomcat 9.0.111)
Description: declaration: package: javax.servlet.http, class: HttpSessionEvent

# Class HttpSessionEvent

java.lang.Object
java.util.EventObject
javax.servlet.http.HttpSessionEvent

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `HttpSessionBindingEvent`

public class HttpSessionEvent extends EventObject
This is the class representing event notifications for changes to sessions within a web application.

Since:
  Servlet 2.3
See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HttpSessionEvent(HttpSession source)`
  Construct a session event from the given source.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HttpSession`
  `getSession()`
  Get the session that changed.

  ### Methods inherited from class EventObject

  `getSource, toString`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### HttpSessionEvent

    public HttpSessionEvent(HttpSession source)
    Construct a session event from the given source.
    Parameters:
      `source` - The HTTP session where the change took place

- ## Method Details

  - ### getSession

    public HttpSession getSession()
    Get the session that changed.
    Returns:
      The session that changed