HydraExpress™ C++ 2019 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Dispatches requests to other resources. More...
#include <rwsf/servlet/RequestDispatcher.h>
Public Member Functions | |
RequestDispatcher () | |
RequestDispatcher (const RequestDispatcher &second) | |
virtual | ~RequestDispatcher () |
void | forward (rwsf::ServletRequest &request, rwsf::ServletResponse &response) |
void | include (rwsf::ServletRequest &request, rwsf::ServletResponse &response) |
RequestDispatcher & | operator= (const RequestDispatcher &rhs) |
Public Member Functions inherited from rwsf::HandleBase | |
bool | isValid (void) const |
bool | operator!= (const HandleBase &second) const |
bool | operator== (const HandleBase &second) const |
Additional Inherited Members | |
Protected Member Functions inherited from rwsf::HandleBase | |
HandleBase (void) | |
HandleBase (StaticCtor) | |
HandleBase (BodyBase *body) | |
HandleBase (const HandleBase &second) | |
virtual | ~HandleBase (void) |
BodyBase & | body (void) const |
HandleBase & | operator= (const HandleBase &second) |
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 |
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 © 2019 Rogue Wave Software, Inc. All Rights Reserved. |