public class KKAdminServletContextListener extends java.lang.Object implements KKAdminServletContextListenerIf
Modifier and Type | Class and Description |
---|---|
protected class |
KKAdminServletContextListener.KKThread
Used to store the Thread and an Id
|
Modifier and Type | Field and Description |
---|---|
private org.apache.commons.logging.Log |
log
The
Log instance for this class. |
private javax.servlet.ServletContext |
servletContext |
private static KKAdminServletContextListener |
singleton |
private java.util.Map<java.lang.String,KKAdminServletContextListener.KKThread> |
threads |
Constructor and Description |
---|
KKAdminServletContextListener()
A listener class must have a zero-argument constructor:
|
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent sce) |
void |
contextInitialized(javax.servlet.ServletContextEvent sce) |
static KKAdminServletContextListenerIf |
get()
Gets the singleton KKAdminServletContextListener instance.
|
void |
registerThread(java.lang.Thread thread,
java.lang.String id)
Accepts a thread that needs to be shut down when the web app is shut down
|
private static KKAdminServletContextListener singleton
private javax.servlet.ServletContext servletContext
private java.util.Map<java.lang.String,KKAdminServletContextListener.KKThread> threads
private org.apache.commons.logging.Log log
Log
instance for this class.public KKAdminServletContextListener()
public static KKAdminServletContextListenerIf get()
public void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
contextDestroyed
in interface javax.servlet.ServletContextListener
public void registerThread(java.lang.Thread thread, java.lang.String id)
KKAdminServletContextListenerIf
registerThread
in interface KKAdminServletContextListenerIf
thread
- the Thread object that will receive the shutdown message at shutdownid
- A String that indicates what the Thread isCopyright © 2018 DS Data Systems UK Ltd.