NAME
Wombat::Valve - internal valve interface
SYNOPSIS
DESCRIPTION
This interface specifies a component that assists in processing requests for a particular Container. A series of Valves is generally associated with each other via a Pipeline.
A Valve MAY perform the following actions, in the specified order:
Examine and/or modify the properties of the specified Request and Response.
Examine the properties of the specified Request, completely generate the corresponding Response, and return control to the caller.
Examine the properties of the specified Request and Response, wrap either or both of these objects to supplement their functionality, and pass them on.
If the corresponding Response was not generated (and control was not returned), call the next Valve in the Pipeline by calling
invokeNext()
on the Valve's Container.Examine, but not modify, the properties of the resulting Response (which was created by a subsequently invoked Valve or Container).
A Valve MUST NOT do any of the following things:
Change request properties that have already been used to direct the flow of processing control for this request.
Create a completed Response AND pass this Request and Response on to the next Valve in the Pipeline.
Consume bytes from the input handle associated with the Request, unless it is completely generating the Response or wrapping the Request before passing it on.
Modify the HTTP headers included with the Response after
invokeNext()
has returned.Perform any actions on the output handle associated with the specified Response after
invokeNext()
has returned.
PUBLIC METHODS
- invoke ($request, $response, $context)
-
Perform request processing as required by this Valve.
Parameters
- $request
-
the Wombat::Request to be processed
- $response
-
the Wombat::Response to be created
- $context
-
the Wombat::ValveContext allowing access to the next Valve in the Pipeline being processed
Throws:
SEE ALSO
Servlet::Util::Exception, Wombat::Container, Wombat::Exception, Wombat::Pipeline, Wombat::Request, Wombat::Response, Wombat::ValveContext
AUTHOR
Brian Moseley, bcm@maz.org