org.appng.core.controller

## Class SessionListener

- java.lang.Object
- - org.appng.core.controller.SessionListener

- All Implemented Interfaces:
    EventListener, javax.servlet.http.HttpSessionListener

      @WebListener
      public class SessionListener
      extends Object
      implements javax.servlet.http.HttpSessionListener

  A (ServletContext/HttpSession/ServletRequest) listener that keeps track of creation/destruction and usage of `HttpSession`s by putting a `Session` object, into the `HttpSession`
  Author:
    Matthias Herlitzius, Matthias Müller

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.apache.commons.lang3.time.FastDateFormat` | `DATE_PATTERN`
    `static String` | `MDC_SESSION_ID`
    `static String` | `META_DATA`
    `static String` | `SESSION_MANAGER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionListener()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Session` | `getSession(javax.servlet.http.HttpSession httpSession)`
    `void` | `sessionCreated(javax.servlet.http.HttpSessionEvent event)`
    `void` | `sessionDestroyed(javax.servlet.http.HttpSessionEvent event)`
    `protected static void` | `setSession(javax.servlet.http.HttpSession httpSession, Session session)`

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

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

- - ### Field Detail

    - #### SESSION_MANAGER

          public static final String SESSION_MANAGER

      See Also:
        Constant Field Values

    - #### META_DATA

          public static final String META_DATA

      See Also:
        Constant Field Values

    - #### MDC_SESSION_ID

          public static final String MDC_SESSION_ID

      See Also:
        Constant Field Values

    - #### DATE_PATTERN

          public static final org.apache.commons.lang3.time.FastDateFormat DATE_PATTERN

  - ### Constructor Detail

    - #### SessionListener

          public SessionListener()

  - ### Method Detail

    - #### sessionCreated

          public void sessionCreated(javax.servlet.http.HttpSessionEvent event)

      Specified by:
        `sessionCreated` in interface `javax.servlet.http.HttpSessionListener`

    - #### sessionDestroyed

          public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)

      Specified by:
        `sessionDestroyed` in interface `javax.servlet.http.HttpSessionListener`

    - #### getSession

          public static Session getSession(javax.servlet.http.HttpSession httpSession)

    - #### setSession

          protected static void setSession(javax.servlet.http.HttpSession httpSession,
                                           Session session)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.