Valve
A Valve
is an atomic request processing component that is assembled into the Pipeline
of a Container
. The name Valve
is a metaphor for a processing unit in a real world pipeline, where a valve controls and/or modifies what flows through it.
The org.apache.catalina.Valve
interface defines methods for obtaining the next Valve
in the pipeline; a backgroundProcess()
method to execute a periodic task; and an invoke(Request, Response)
method, which performs the actual processing associated with this valve.
A Valve
may act on the request and response in a number of different ways, including:
Examining and/or modifying the properties of the incoming request or outgoing response.
Wrapping the request and/or response objects to supplement their functionality before passing them on.
Completing its task and invoking the next
Valve
in the sequence, if any, by callinggetNext().invoke()
with the incoming CatalinaRequest
andResponse
.Terminating request processing by generating and returning a complete...