Wombat::Connector::HttpRequestBase - internal http request base class
package My::Connector::HttpRequest; use base qw(Wombat::Connector::HttpRequestBase);
Convenience base implementation of Wombat::HttpRequest and Servlet::Http::HttpServletRequest which can be used for most connectors that implement the HTTP protocol. Only connector-specific methods need to be implemented. Extends Wombat::Connector::RequestBase.
Construct and return a Wombat::Connector::Http::RequestBase instance, initializing fields appropriately. If subclasses override the constructor, they must be sure to call
$self->SUPER::new();
Return the authentication type used for this Request.
Set the authentication type used for this request.
Parameters:
the authentication type, as defined in Servlet::Http::HttpServletRequest
Servlet::Http::HttpServletRequest
Return the portion of the request URI used to select the Application for the Request.
Set the context path for this Request. This will normally be called when the associated Application is mapping the Request to a particular Wrapper.
the context path
Add a Cookie to the set of Cookies for this Request. This will normally be called when the Connector is parsing the request headers.
the Servlet::Http::Cookie
Return the set of Cookies received with this Request.
Remove all Cookies for this Request.
Return the value of the named date header, or -1.
the header name
Add a value for the named request header.
the parameter name
the parameter value, scalar
Return the first value for the named request header.
Return the names of all headers received for this Request.
Return the list of values for the named request header.
Unset all headers for this Request.
Return the HTTP request method used for this Request.
Set the HTTP request method used for this Request.
the request method
Return the value of the named request parameter. If more than one value is defined, return only the first one. Extract parameters from the request if not already done.
the name of the parameter
Return a hash of the parameters of this Request. The keys of the hash are the parameter names, and the values of the hash are arrays of parameter values. Extract parameters from the request if not already done.
Return an array containing the names of the parameters contained in this Request. Extract parameters from the request if not already done.
Return an array containing all of the values of the named request parameter. Extract parameters from the request if not already done.
Return the path information for this Request.
Set the path information for this Request. This will normally be called when the associated Application is mapping the Request to a particular Wrapper.
the path information
turn extra path information for this request, translated to a real path.
Return the query string for this Request.
Set the query string for this Request. This is normally called by the Connector when it parses the request headers.
the query string
Return the name of the remote user that has been authenticated for this Request.
Return a flag indicating whether or not the requested session ID for this Request came in through a cookie.
Set a flag indicating whether or not the requested session ID for this Request came in through a cookie. This is normally called by the Connector when it parses the request headers.
a boolean value
Return the session ID included in this Request, if any.
Set the requested session ID for this Request. This is normally called by the Connector when it parses the request headers.
the session id
Return a flag indicating whether or not the requested session ID for this Request came in through the request URL.
Set a flag indicating whether or not the requested session ID for this Request came in through the request URL. This is normally called by the Connector when it parses the request headers.
Return the request URI for this Request.
Set the unparsed request URI for this Request. This is normally called by the Connector when it parses the request headers.
the request URI
Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does no tinclude query string parameters.
This method is useful for creating redirect messages and for reporting errors.
Return the portion of the request URI used to select the servlet that will process this Request.
Set the servlet path for this Request. This is normally called when the associated Application is mapping the Request to a particular Wrapper.
the servlet path
Return the Session associated with this Request, creating one if necessary and requested.
a flag indicating whether or not a session is to be created if one is needed and does not exist
Set the internal Session associated with this Request.
The Wombat::Core::Session to set
Return the name of the current authenticated user.
Set the principal that has been authenticated for this Request. This value is also used to calculate the value to be returned by getRemoteUser().
getRemoteUser()
the Servlet::Util::Principal to set
Return a boolean value indicating whether or not the requested session ID is still valid.
Return a boolean value indicating whether or not the authenticated user principal is associated with the named role.
the name of the role
Release all object references and initialize instances variables in preparation for use or reuse of this object.
Servlet::Http::HttpServletRequest, Servlet::Util::Principal, Wombat::HttpRequest, Wombat::HttpSession, Wombat::Connector::RequestBase
Brian Moseley, bcm@maz.org
To install Wombat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wombat
CPAN shell
perl -MCPAN -e shell install Wombat
For more information on module installation, please visit the detailed CPAN module installation guide.