Class HttpSessionEventPublisher
java.lang.Object
org.springframework.security.web.session.HttpSessionEventPublisher
- All Implemented Interfaces:
- jakarta.servlet.http.HttpSessionIdListener,- jakarta.servlet.http.HttpSessionListener,- EventListener
public class HttpSessionEventPublisher
extends Object
implements jakarta.servlet.http.HttpSessionListener, jakarta.servlet.http.HttpSessionIdListener
Declared in web.xml as
 
 <listener>
     <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
 </listener>
 
 Publishes HttpSessionApplicationEvents to the Spring Root
 WebApplicationContext. Maps jakarta.servlet.http.HttpSessionListener.sessionCreated()
 to HttpSessionCreatedEvent. Maps
 jakarta.servlet.http.HttpSessionListener.sessionDestroyed() to
 HttpSessionDestroyedEvent.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidsessionCreated(jakarta.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionCreatedEventto the application appContext.voidsessionDestroyed(jakarta.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionDestroyedEventto the application appContext.voidsessionIdChanged(jakarta.servlet.http.HttpSessionEvent event, String oldSessionId) 
- 
Constructor Details- 
HttpSessionEventPublisherpublic HttpSessionEventPublisher()
 
- 
- 
Method Details- 
sessionCreatedpublic void sessionCreated(jakarta.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionCreatedEventto the application appContext.- Specified by:
- sessionCreatedin interface- jakarta.servlet.http.HttpSessionListener
- Parameters:
- event- HttpSessionEvent passed in by the container
 
- 
sessionDestroyedpublic void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionDestroyedEventto the application appContext.- Specified by:
- sessionDestroyedin interface- jakarta.servlet.http.HttpSessionListener
- Parameters:
- event- The HttpSessionEvent pass in by the container
 
- 
sessionIdChanged- Specified by:
- sessionIdChangedin interface- jakarta.servlet.http.HttpSessionIdListener
 
 
-