HydraExpress 4.6 |
HydraExpress C++ API Reference Guide |
|
Base class for filters. More...
#include <rwsf/servlet/Filter.h>
Public Member Functions | |
virtual void | init (const rwsf::FilterConfig &filterConfig) |
virtual void | doFilter (rwsf::ServletRequest &request, rwsf::ServletResponse &response, rwsf::FilterChain *chain)=0 |
virtual void | destroy () |
rwsf::FilterConfig | getFilterConfig () const |
rwsf::Filter is the base class for filters. A filter processes the requests and responses for a resource. For example, a filter might compress or encode the response from a Web Service, transform an XML response into HTML, or adapt an incoming request.
The Agent loads filters during initialization. Each rwsf::Filter contains an rwsf::FilterConfig that holds the initialization parameters for the filter. The rwsf::FilterConfig object also provides access to the rwsf::ServletContext object that represents the context within which the filter is deployed.
virtual void rwsf::Filter::destroy | ( | ) | [virtual] |
The Agent calls this function when the filter is removed from service. All cleanup for a filter should be done in this method rather than in the filter destructor.
virtual void rwsf::Filter::doFilter | ( | rwsf::ServletRequest & | request, | |
rwsf::ServletResponse & | response, | |||
rwsf::FilterChain * | chain | |||
) | [pure virtual] |
Pure virtual function. Processes a request. In derived classes, the Agent calls this function for each request received from a client. A derived class uses the doFilter() function of the chain to invoke the next filter in the filter chain.
rwsf::FilterConfig rwsf::Filter::getFilterConfig | ( | ) | const |
Returns the rwsf::FilterConfig object that was used to initialize this filter.
virtual void rwsf::Filter::init | ( | const rwsf::FilterConfig & | filterConfig | ) | [virtual] |
This method is called by the Agent when this filter is first initialized. Override this method in a derived class to add initialization code. All resource allocation for a filter should be done in this method rather than in the filter constructor.
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.