Java Code Examples for javax.servlet.http.HttpSessionListener#sessionDestroyed()

The following examples show how to use javax.servlet.http.HttpSessionListener#sessionDestroyed() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SessionEventHttpSessionListenerAdapter.java    From spring-session with Apache License 2.0 6 votes vote down vote up
@Override
public void onApplicationEvent(AbstractSessionEvent event) {
	if (this.listeners.isEmpty()) {
		return;
	}

	HttpSessionEvent httpSessionEvent = createHttpSessionEvent(event);

	for (HttpSessionListener listener : this.listeners) {
		if (event instanceof SessionDestroyedEvent) {
			listener.sessionDestroyed(httpSessionEvent);
		}
		else if (event instanceof SessionCreatedEvent) {
			listener.sessionCreated(httpSessionEvent);
		}
	}
}
 
Example 2
Source File: MainHttpSessionListener.java    From lutece-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void sessionDestroyed( HttpSessionEvent se )
{
    for ( HttpSessionListener listener : HttpSessionListenerService.getListeners( ) )
    {
        listener.sessionDestroyed( se );
    }
}
 
Example 3
Source File: BootstrapListener.java    From rice with Educational Community License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent)
 */
public void sessionDestroyed(final HttpSessionEvent event) {
    LOG.debug("Begin BootstrapListener session destroyed...");
    
    init();
    
    for (HttpSessionListener listener : listeners.values()) {
        listener.sessionDestroyed(event);
    }
    
    LOG.debug("...end BootstrapListener session destroyed.");
}
 
Example 4
Source File: ProxyServletListener.java    From lemon with Apache License 2.0 5 votes vote down vote up
public void sessionDestroyed(HttpSessionEvent se) {
    if (ctx == null) {
        logger.warn("cannot find applicationContext");

        return;
    }

    Collection<HttpSessionListener> httpSessionListeners = ctx
            .getBeansOfType(HttpSessionListener.class).values();

    for (HttpSessionListener httpSessionListener : httpSessionListeners) {
        httpSessionListener.sessionDestroyed(se);
    }
}
 
Example 5
Source File: FakeHttpSession.java    From ontopia with Apache License 2.0 4 votes vote down vote up
@Override
public void invalidate() {
  for (HttpSessionListener listener : listeners) {
    listener.sessionDestroyed(new HttpSessionEvent(this));
  }
}