listeners
Class ContextListener

java.lang.Object
  extended bylisteners.ContextListener
All Implemented Interfaces:
EventListener, ServletContextAttributeListener, ServletContextListener

public final class ContextListener
extends Object
implements ServletContextAttributeListener, ServletContextListener

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 08:40:35 -0800 (Thu, 18 Mar 2004) $
Author:
Craig R. McClanahan

Constructor Summary
ContextListener()
           
 
Method Summary
 void attributeAdded(ServletContextAttributeEvent event)
          Record the fact that a servlet context attribute was added.
 void attributeRemoved(ServletContextAttributeEvent event)
          Record the fact that a servlet context attribute was removed.
 void attributeReplaced(ServletContextAttributeEvent event)
          Record the fact that a servlet context attribute was replaced.
 void contextDestroyed(ServletContextEvent event)
          Record the fact that this web application has been destroyed.
 void contextInitialized(ServletContextEvent event)
          Record the fact that this web application has been initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextListener

public ContextListener()
Method Detail

attributeAdded

public void attributeAdded(ServletContextAttributeEvent event)
Record the fact that a servlet context attribute was added.

Specified by:
attributeAdded in interface ServletContextAttributeListener
Parameters:
event - The servlet context attribute event

attributeRemoved

public void attributeRemoved(ServletContextAttributeEvent event)
Record the fact that a servlet context attribute was removed.

Specified by:
attributeRemoved in interface ServletContextAttributeListener
Parameters:
event - The servlet context attribute event

attributeReplaced

public void attributeReplaced(ServletContextAttributeEvent event)
Record the fact that a servlet context attribute was replaced.

Specified by:
attributeReplaced in interface ServletContextAttributeListener
Parameters:
event - The servlet context attribute event

contextDestroyed

public void contextDestroyed(ServletContextEvent event)
Record the fact that this web application has been destroyed.

Specified by:
contextDestroyed in interface ServletContextListener
Parameters:
event - The servlet context event

contextInitialized

public void contextInitialized(ServletContextEvent event)
Record the fact that this web application has been initialized.

Specified by:
contextInitialized in interface ServletContextListener
Parameters:
event - The servlet context event


Copyright © 2006 Apache Software Foundation. All Rights Reserved.