Wombat::Request - internal request interface

- NAME
- SYNOPSIS
- DESCRIPTION
- ACCESSOR METHODS
- PUBLIC METHODS
- SEE ALSO
- AUTHOR

# NAME

Wombat::Request - internal request interface

# SYNOPSIS

# DESCRIPTION

This interface extends Servlet::ServletRequest to provide fields and methods accessible only to the container.

# ACCESSOR METHODS

`getApplication()`
  Return the Application within which this Request is being processed.

`setApplication($application)`
  Set the Application within which this Request is being processed. This must be called as soon as the appropriate Application is identified, because it enables parsing of the request URI.

  Parameters:

  $application
    the Wombat::Application within which the Request is being processed

`getAuthorization()`
  Return the authorization credentials sent with this Request.

`setAuthorization($authorization)`
  Sets the authorization credentials sent with this Request.

  Parameters:

  $authorization
    the authorization credentials

`getConnector()`
  Return the Connector through which this Request was received.

`setConnector($connector)`
  Set the Connector through which this request was received.

  Parameters:

  $connector
    the Wombat::Connector that received the request

`getHandle()`
  Return the input handle associated with this Request. Usually the Socket and Handle for the Request are the same object, but this is not required.

`setHandle($handle)`
  Set the input handle ssociated with this Request.

  Parameters:

  $handle
    the IO::Handle associated with this Request

`getRequest()`
  Return the ServletRequest which acts as a facade for this Request to servlet applications.

`getResponse()`
  Return the Response with which this Request is associated.

`setResponse($response)`
  Set the Response with which this Request is associated.

  Parameters:

  $response
    the Wombat::Response with which this Request is associated

`getSocket()`
  Return the Socket (if any) through which this Request was received. This should only be used to access underlying state information about the Socket, such as the SSL information of a IO::Socket::SSL.

`setSocket($socket)`
  Set the Socket (if any) through which this Request was received.

  Parameters:

  $socket
    the IO::Socket through which this Request was received

`getWrapper()`
  Returns the Wrapper within which this Request is being processed.

`setWrapper($wrapper)`
  Set the Wrapper within which this Request is being processed. This must be called as soon as the appropriate Wrapper is identified, and before the Request is ultimately passed to an application servlet.

  Parameters:

  $wrapper
    the Wombat::Wrapper associated with this Request

# PUBLIC METHODS

`addLocale($loc)`
  Add a locale to the set of preferred Locales for this Request.

  Parameters:

  $loc
    the locale to add

addParameter($name, @values)
  Add a named parameter with one or more values to this Request.

  Parameters:

  $name
    the name of the parameter to add

  @values
    a list of one or more parameter values, scalar or `undef`

`clearLocales()`
  Clear the list of locales for this Request.

`clearParameters()`
  Clear the set of parameters for this Request.

`createInputHandle()`
  Create and return a Servlet::ServletInputHandle to read the content associated with this Request.

  Throws:

  Servlet::Util::IOException
    if an input or output error occurs

`finishRequest()`
  Perform whatever actions are required to flush and close the input handle or reader.

  Throws:

  Servlet::Util::IOException
    if an input or output error occurs

`setContentLength($length)`
  Set the length, in bytes, of the request body provided by the input handle.

  Parameters:

  $length
    the content length in bytes

`setContentType($type)`
  Set the MIME type of the body of the body of the request.

  Parameters:

  $type
    the MIME type

`setProtocol($protocol)`
  Set the name and version of the protocol used for the request in the form protocol/majorVersion.minorVersion.

  Parameters:

  $protocol
    the name and version of the protocol

`setRemoteAddr($remote)`
  Set the remote IP address associated with this Request. This value will be used to resolve the name of the remote host if necessary.

  Parameters:

  $remote
    the remote IP address

`setScheme($scheme)`
  Set the name of the scheme used to make this request, for example http, https, or ftp.

  Parameters:

  $scheme
    the name of the scheme

`setSecure($secure)`
  Set a value indicating whether or not the request was made using a secure channel.

  Parameters:

  $secure
    a boolean value

`setServerName($name)`
  Set the host name of the server which received this request.

  Parameters:

  $name
    the host name

`setServerPort($port)`
  Set the port number on which this request was received.

  Parameters:

  $port
    the port number

`recycle()`
  Release all object references and initialize instances variables in preparation for use or reuse of this object.

# SEE ALSO

the IO::Handle manpage, the IO::Socket manpage, the Servlet::ServletRequest manpage, the Servlet::ServletServletInputHandle manpage, the Servlet::Util::Exception manpage, the Wombat::Application manpage, the Wombat::Connector manpage, the Wombat::Response manpage, the Wombat::Wrapper manpage

# AUTHOR

Brian Moseley, bcm@maz.org