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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidsessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) final voidsessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent)
-
Constructor Details
-
TraceSessionListener
public TraceSessionListener() -
TraceSessionListener
-
-
Method Details
-
sessionCreated
public final void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) - Specified by:
sessionCreatedin interfacejavax.servlet.http.HttpSessionListener
-
sessionDestroyed
public final void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) - Specified by:
sessionDestroyedin interfacejavax.servlet.http.HttpSessionListener
-