Valvepublic interface Valve A Valve is a request processing component associated with a
particular Container. A series of Valves are generally associated with
each other into a Pipeline. The detailed contract for a Valve is included
in the description of the invoke() method below.
HISTORICAL NOTE: The "Valve" name was assigned to this concept
because a valve is what you use in a real world pipeline to control and/or
modify flows through it. |
Fields Summary |
---|
public static final int | INVOKE_NEXTA valve returns this value to indicate (to the pipeline) that the next
valve in the pipeline can be invoked. | public static final int | END_PIPELINEA valve returns this value to indicate that no further processing
of the request should take place (along the rest of the pipeline).
All valves that are function as 'basic' valves return this value
as they are the 'last' valve in the pipeline. A valve (such as an
authenticator) may return this value to stop a request from being
processed further because the user/password could not be verified. |
Methods Summary |
---|
public java.lang.String | getInfo()Return descriptive information about this Valve implementation.
| public int | invoke(Request request, Response response)In order to reduce the stack depth, a ValveContext is no longer
passed into the invoke() method. Instead, the method
returns either INVOKE_NEXT or END_PIPELINE to the caller
(Pipeline.invoke() ). This return code is used to
determine whether the next valve in the pipeline should be
invoked.
| public void | postInvoke(Request request, Response response)Perform post-request processing as required by this Valve.
|
|