Class HttpSessionEventPublisher
java.lang.Object
org.springframework.security.web.session.HttpSessionEventPublisher
- All Implemented Interfaces:
EventListener,javax.servlet.http.HttpSessionIdListener,javax.servlet.http.HttpSessionListener
public class HttpSessionEventPublisher
extends Object
implements javax.servlet.http.HttpSessionListener, javax.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 javax.servlet.http.HttpSessionListener.sessionCreated() to
HttpSessionCreatedEvent. Maps
javax.servlet.http.HttpSessionListener.sessionDestroyed() to
HttpSessionDestroyedEvent.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsessionCreated(javax.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionCreatedEventto the application appContext.voidsessionDestroyed(javax.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionDestroyedEventto the application appContext.voidsessionIdChanged(javax.servlet.http.HttpSessionEvent event, String oldSessionId)
-
Constructor Details
-
HttpSessionEventPublisher
public HttpSessionEventPublisher()
-
-
Method Details
-
sessionCreated
public void sessionCreated(javax.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionCreatedEventto the application appContext.- Specified by:
sessionCreatedin interfacejavax.servlet.http.HttpSessionListener- Parameters:
event- HttpSessionEvent passed in by the container
-
sessionDestroyed
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event) Handles the HttpSessionEvent by publishing aHttpSessionDestroyedEventto the application appContext.- Specified by:
sessionDestroyedin interfacejavax.servlet.http.HttpSessionListener- Parameters:
event- The HttpSessionEvent pass in by the container
-
sessionIdChanged
- Specified by:
sessionIdChangedin interfacejavax.servlet.http.HttpSessionIdListener
-