|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.echo.http.ContextListener
public abstract class ContextListener
A ServletContextListener and HttpSessionListener to close any resources that
are held by the Application instance or its subclasses.
© Copyright 2006 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected static Logger |
logger
The logger to use to log messages to. |
static String |
SESSION_KEY
The session key associated with the echo application. |
| Constructor Summary | |
|---|---|
ContextListener()
|
|
| Method Summary | |
|---|---|
protected abstract void |
close()
Close or cleanup any resources when the context is destroyed. |
protected abstract void |
close(HttpSession session)
Close any resources associated with the session. |
void |
contextDestroyed(ServletContextEvent event)
Iterate over collection of sessions and invalidate them. |
void |
contextInitialized(ServletContextEvent event)
|
protected Application |
getApplication(HttpSession httpSession)
Return the application instance associated with the specified session. |
void |
sessionCreated(HttpSessionEvent event)
Add the session to the collection of sessions. |
void |
sessionDestroyed(HttpSessionEvent event)
Close any resources associated with the session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SESSION_KEY
protected static final Logger logger
| Constructor Detail |
|---|
public ContextListener()
| Method Detail |
|---|
public void contextInitialized(ServletContextEvent event)
contextInitialized in interface ServletContextListenerpublic void contextDestroyed(ServletContextEvent event)
contextDestroyed in interface ServletContextListenerpublic void sessionCreated(HttpSessionEvent event)
sessionCreated in interface HttpSessionListenerpublic void sessionDestroyed(HttpSessionEvent event)
sessionDestroyed in interface HttpSessionListenerclose(javax.servlet.http.HttpSession)protected Application getApplication(HttpSession httpSession)
httpSession - The session for which the application instance is
to be retrieved.
null if no application instance is associated.protected abstract void close(HttpSession session)
session - The session in which the connection was established.protected abstract void close()
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||