|
|||||||||
| Home >> All >> [ listeners overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
listeners
Class ContextListener

java.lang.Objectlisteners.ContextListener
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener
- public final class ContextListener
- extends java.lang.Object
- implements javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener
- extends java.lang.Object
Example listener for context-related application events, which were introduced in the 2.3 version of the Servlet API. This listener merely documents the occurrence of such events in the application log associated with our servlet context.
- Version:
- $Revision: 267129 $ $Date: 2004-03-18 11:40:35 -0500 (Thu, 18 Mar 2004) $
| Field Summary | |
private javax.servlet.ServletContext |
context
The servlet context with which we are associated. |
| Constructor Summary | |
ContextListener()
|
|
| Method Summary | |
void |
attributeAdded(javax.servlet.ServletContextAttributeEvent event)
Record the fact that a servlet context attribute was added. |
void |
attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
Record the fact that a servlet context attribute was removed. |
void |
attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
Record the fact that a servlet context attribute was replaced. |
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
Record the fact that this web application has been destroyed. |
void |
contextInitialized(javax.servlet.ServletContextEvent event)
Record the fact that this web application has been initialized. |
private void |
log(java.lang.String message)
Log a message to the servlet context application log. |
private void |
log(java.lang.String message,
java.lang.Throwable throwable)
Log a message and associated exception to the servlet context application log. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
context
private javax.servlet.ServletContext context
- The servlet context with which we are associated.
| Constructor Detail |
ContextListener
public ContextListener()
| Method Detail |
attributeAdded
public void attributeAdded(javax.servlet.ServletContextAttributeEvent event)
- Record the fact that a servlet context attribute was added.
- Specified by:
attributeAddedin interfacejavax.servlet.ServletContextAttributeListener
attributeRemoved
public void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
- Record the fact that a servlet context attribute was removed.
- Specified by:
attributeRemovedin interfacejavax.servlet.ServletContextAttributeListener
attributeReplaced
public void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
- Record the fact that a servlet context attribute was replaced.
- Specified by:
attributeReplacedin interfacejavax.servlet.ServletContextAttributeListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Record the fact that this web application has been destroyed.
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Record the fact that this web application has been initialized.
- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
log
private void log(java.lang.String message)
- Log a message to the servlet context application log.
log
private void log(java.lang.String message, java.lang.Throwable throwable)
- Log a message and associated exception to the servlet context
application log.
|
|||||||||
| Home >> All >> [ listeners overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
listeners.ContextListener