Wombat::Valve::ValveBase - valve base class
Convenience base implementation of Wombat::Valve. Subclasses
MUST implement invoke()
to provide the required functionality as
well as getName()
.
new()
-
Construct and return a Wombat::Valve::ValveBase instance,
initializing fields appropriately. If subclasses override the
constructor, they must be sure to call
$self->SUPER::new();
getContainer()
-
Return the Container to which this Valve is attached.
setContainer($container)
-
Set the Container to which this Valve is attached.
Parameters:
- $container
-
the Wombat::Container to which this Valve is attached.
- 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:
- Servlet::ServletException
-
if a servlet error occurs or is thrown by a subsequently invoked
Valve, Filter or Servlet
- Servlet::Util::IOException
-
if an input or output error occurs
getName()
-
Return a short name for this Valve implementation. Must be overridden
by subclasses.
start()
-
Prepare for active use of this component. This method should be called
before any of the public methods of the component are utilized.
Throws:
- Wombat::LifecycleException
-
if the component has already been started
stop()
-
Gracefully terminate active use of this component. Once this method
has been called, no public methods of the component should be
utilized.
Throws:
- Wombat::LifecycleException
-
if the component is not started
the Servlet::ServletException manpage,
the Servlet::Util::Exception manpage,
the Wombat::Container manpage,
the Wombat::Exception manpage,
the Wombat::Valve manpage,
the Wombat::ValveContext manpage
Brian Moseley, bcm@maz.org