Skip to content

Ansku/CleanupServlet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Published on Vaadin  Directory Stars on vaadin.com/directory

CleanupServlet Add-on for Vaadin 7

CleanupServlet is an add-on for Vaadin 7. It's an extended VaadinServlet that provides a cleanup thread to clear out session when all UIs have been closed, without needing to wait for the session timeout.

Usage:

    @WebServlet(value = "/*", asyncSupported = true)
    @VaadinServletConfiguration(productionMode = false, ui = CleanupServletDemoUI.class, heartbeatInterval = 1)
    public static class Servlet extends CleanupServlet {
        @Override
        protected int getCleanupPollingInterval() {
            // how long to wait between session timeout checks
            return 3000;
        }
        @Override
        protected boolean alwaysCheckUITimeOuts() {
            // if you want to ensure UI cleanup on every check
            // regardless of session timeout, default false
            return true;
        }
    }

For a more comprehensive example, see src/main/java/org/vaadin/anna/cleanupservlet/demo/CleanupServletDemoUI.java

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages