HydraExpress 4.6 |
HydraExpress C++ API Reference Guide |
|
Dispatches requests to other resources. More...
#include <rwsf/servlet/RequestDispatcher.h>
Public Member Functions | |
RequestDispatcher () | |
RequestDispatcher (const RequestDispatcher &second) | |
virtual | ~RequestDispatcher () |
RequestDispatcher & | operator= (const RequestDispatcher &rhs) |
void | forward (rwsf::ServletRequest &request, rwsf::ServletResponse &response) |
void | include (rwsf::ServletRequest &request, rwsf::ServletResponse &response) |
rwsf::RequestDispatcher forwards requests to other resources within the Agent or to a remote HTTP resource. Instances of this class are created by the Agent. The getNamedDispatcher() and getRequestDispatcher() functions of class rwsf::ServletContext provide access to rwsf::RequestDispatcher objects.
rwsf::RequestDispatcher::RequestDispatcher | ( | ) |
Creates an empty, invalid request dispatcher. Use the copy constructor or assignment operator to create a valid request dispatcher.
rwsf::RequestDispatcher::RequestDispatcher | ( | const RequestDispatcher & | second | ) |
Creates a new RequestDispatcher handle to the body instance of second.
virtual rwsf::RequestDispatcher::~RequestDispatcher | ( | ) | [virtual] |
Detaches from the current body (if any), decrements the reference count of the body, and deletes the body if there are no other references.
void rwsf::RequestDispatcher::forward | ( | rwsf::ServletRequest & | request, | |
rwsf::ServletResponse & | response | |||
) |
Forwards request and response to another resource. The other resource can be another servlet within the Agent, a static file in one of the Agent contexts, or a remote resource available through HTTP. Clears the response buffer before forwarding request and response.
void rwsf::RequestDispatcher::include | ( | rwsf::ServletRequest & | request, | |
rwsf::ServletResponse & | response | |||
) |
Includes the response from another resource into the response for this servlet. The other resource can be another servlet within the Agent, a static file in one of the Agent contexts, or a remote resource available through HTTP. Does not clear the response buffer before forwarding request and response.
RequestDispatcher& rwsf::RequestDispatcher::operator= | ( | const RequestDispatcher & | rhs | ) |
Associates this handle with the rhs body instance. Returns a reference to self.
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.