Wombat::Valve - internal valve interface
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.
invokeNext()
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.
Perform request processing as required by this Valve.
Parameters
the Wombat::Request to be processed
the Wombat::Response to be created
the Wombat::ValveContext allowing access to the next Valve in the Pipeline being processed
Throws:
if a servlet error occurs or is thrown by a subsequently invoked Valve, Filter or Servlet
if an input or output error occurs
Servlet::Util::Exception, Wombat::Container, Wombat::Exception, Wombat::Pipeline, Wombat::Request, Wombat::Response, Wombat::ValveContext
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.