public class FileCleanerCleanup extends java.lang.Object implements ServletContextListener
FileCleaningTracker
's reaper thread is terminated,
when the web application is destroyed.Modifier and Type | Field and Description |
---|---|
static java.lang.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(ServletContextEvent sce)
Called when the web application is being destroyed.
|
void |
contextInitialized(ServletContextEvent sce)
Called when the web application is initialized.
|
static FileCleaningTracker |
getFileCleaningTracker(ServletContext pServletContext)
Returns the instance of
FileCleaningTracker , which is
associated with the given ServletContext . |
static void |
setFileCleaningTracker(ServletContext pServletContext,
FileCleaningTracker pTracker)
Sets the instance of
FileCleaningTracker , which is
associated with the given ServletContext . |
public static final java.lang.String FILE_CLEANING_TRACKER_ATTRIBUTE
FileCleaningTracker
in the web application.public static FileCleaningTracker getFileCleaningTracker(ServletContext pServletContext)
FileCleaningTracker
, which is
associated with the given ServletContext
.pServletContext
- The servlet context to querypublic static void setFileCleaningTracker(ServletContext pServletContext, FileCleaningTracker pTracker)
FileCleaningTracker
, which is
associated with the given ServletContext
.pServletContext
- The servlet context to modifypTracker
- The tracker to setpublic void contextInitialized(ServletContextEvent sce)
contextInitialized
in interface ServletContextListener
sce
- The servlet context, used for calling
setFileCleaningTracker(ServletContext, FileCleaningTracker)
.public void contextDestroyed(ServletContextEvent sce)
FileCleaningTracker.exitWhenFinished()
.contextDestroyed
in interface ServletContextListener
sce
- The servlet context, used for calling
getFileCleaningTracker(ServletContext)
.Copyright © 2010 - 2020 Adobe. All Rights Reserved