public class FileCleanerCleanup extends Object implements javax.servlet.ServletContextListener
FileCleaner's
reaper thread is terminated,
when the web application is destroyed.| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_CLEANING_TRACKER_ATTRIBUTE
Attribute name, which is used for storing an instance of
FileCleaningTracker in the web application. |
| Constructor and Description |
|---|
FileCleanerCleanup() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent sce)
Called when the web application is being destroyed.
|
void |
contextInitialized(javax.servlet.ServletContextEvent sce)
Called when the web application is initialized.
|
static org.apache.commons.io.FileCleaningTracker |
getFileCleaningTracker(javax.servlet.ServletContext pServletContext)
Returns the instance of
FileCleaningTracker, which is
associated with the given ServletContext. |
static void |
setFileCleaningTracker(javax.servlet.ServletContext pServletContext,
org.apache.commons.io.FileCleaningTracker pTracker)
Sets the instance of
FileCleaningTracker, which is
associated with the given ServletContext. |
public static final String FILE_CLEANING_TRACKER_ATTRIBUTE
FileCleaningTracker in the web application.public static org.apache.commons.io.FileCleaningTracker getFileCleaningTracker(javax.servlet.ServletContext pServletContext)
FileCleaningTracker, which is
associated with the given ServletContext.pServletContext - The servlet context to querypublic static void setFileCleaningTracker(javax.servlet.ServletContext pServletContext,
org.apache.commons.io.FileCleaningTracker pTracker)
FileCleaningTracker, which is
associated with the given ServletContext.pServletContext - The servlet context to modifypTracker - The tracker to setpublic void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized in interface javax.servlet.ServletContextListenersce - The servlet context, used for calling
setFileCleaningTracker(ServletContext, FileCleaningTracker).public void contextDestroyed(javax.servlet.ServletContextEvent sce)
FileCleaningTracker.exitWhenFinished().contextDestroyed in interface javax.servlet.ServletContextListenersce - The servlet context, used for calling
getFileCleaningTracker(ServletContext).Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.