rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::ServletContextListener Class Reference
[Servlet]

Base class for listeners that receive servlet context notifications. More...

#include <rwsf/servlet/ServletContextListener.h>

Inheritance diagram for rwsf::ServletContextListener:
rwsf::EventListener

List of all members.

Public Member Functions

virtual ~ServletContextListener ()
virtual void contextInitialized (const rwsf::ServletContextEvent &event)=0
virtual void contextDestroyed (const rwsf::ServletContextEvent &event)=0

Detailed Description

rwsf::ServletContextListener is an abstract base class for listeners that receive notifications when the Agent creates or destroys rwsf::ServletContext objects. To create a listener, derive from this class and override the functions that receive events, contextInitialized() and contextDestroyed(). To register a listener, include a deployment descriptor for the listener class in the configuration file of the context. For information on servlet contexts, please see the chapter on servlet concepts in the Servlet Development Guide. For example, the following line in web.xml registers an rwsf::ServletContextListener to a servlet context:

 <listener><listener-class>listeners.createTestListener</listener-class></listener>

Constructor & Destructor Documentation

virtual rwsf::ServletContextListener::~ServletContextListener (  )  [virtual]

Destructor.


Member Function Documentation

virtual void rwsf::ServletContextListener::contextDestroyed ( const rwsf::ServletContextEvent event  )  [pure virtual]

The Agent calls this method when this rwsf::ServletContext goes out of scope. This method does any clean up the listener needs to perform.

virtual void rwsf::ServletContextListener::contextInitialized ( const rwsf::ServletContextEvent event  )  [pure virtual]

This method gets called by the Agent when an rwsf::ServletContext object has just been created and rwsf::ServletContext is ready to start processing requests.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.