HydraExpress™ C++ API Reference Guide

Product Documentation:
   HydraExpress C++
Documentation Home
List of all members | Public Member Functions
rwsf::ServletContextListener Class Referenceabstract

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

#include <rwsf/servlet/ServletContextListener.h>

Inheritance diagram for rwsf::ServletContextListener:

Public Member Functions

virtual ~ServletContextListener ()
virtual void contextDestroyed (const rwsf::ServletContextEvent &event)=0
virtual void contextInitialized (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:


Constructor & Destructor Documentation

virtual rwsf::ServletContextListener::~ServletContextListener ( )


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 © 2020 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.