Class TraceSessionListener

java.lang.Object
org.aoju.bus.tracer.binding.servlet.TraceSessionListener
All Implemented Interfaces:
EventListener, javax.servlet.http.HttpSessionListener

@WebListener("TraceSessionListener to create sessionIds on session creation and remove it instead from the Builder backend on session termination.") public class TraceSessionListener extends Object implements javax.servlet.http.HttpSessionListener
Warning: This boot assumes that the HttpSessionListener is executed on the same thread as the request handling. This might not work for every servlet container. It should at least work for the following containers:
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • TraceSessionListener

      public TraceSessionListener()
    • TraceSessionListener

      protected TraceSessionListener(Backend backend)
  • Method Details

    • sessionCreated

      public final void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent)
      Specified by:
      sessionCreated in interface javax.servlet.http.HttpSessionListener
    • sessionDestroyed

      public final void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent)
      Specified by:
      sessionDestroyed in interface javax.servlet.http.HttpSessionListener