org.apache.catalina
Interface Pipeline

All Known Implementing Classes:
ContainerBase

public interface Pipeline

An optional interface, normally implemented by a Container, that indicates support for a pipeline of Valves is present. When pipeline support is present, the Container's invoke() method will call the invoke() method of the first added Valve, which will either generate the response or pass the request on to the next Valve in the pipeline.

The Container must ensure that at least one Valve in the pipeline actually generates the response and returns. Typically, this is accomplished by configuring the Container's normal processing (in the absence of any other Valves) as a Valve that always appears last in the pipeline.

Version:
$Revision: 1.1 $ $Date: 2000/08/11 05:24:10 $
Author:
Craig R. McClanahan

Method Summary
 void addValve(Valve valve)
          Add a new Valve to the end of the pipeline associated with this Container.
 Valve findValves()
          Return the first Valve in the pipeline associated with this Container.
 void removeValve(Valve valve)
          Remove the specified Valve from the pipeline associated with this Container, if it is found; otherwise, do nothing.
 

Method Detail

addValve

public void addValve(Valve valve)
Add a new Valve to the end of the pipeline associated with this Container. Prior to adding the Valve, the Valve's setContainer method must be called, with this Container as an argument. The method may throw an IllegalArgumentException if this Valve chooses not to be associated with this Container, or IllegalStateException if it is already associated with a different Container.
Parameters:
valve - Valve to be added
Throws:
java.lang.IllegalArgumentException - if this Container refused to accept the specified Valve
java.lang.IllegalArgumentException - if the specifie Valve refuses to be associated with this Container
IllegalStateException - if the specified Valve is already associated with a different Container

findValves

public Valve findValves()
Return the first Valve in the pipeline associated with this Container. If there are no such Valves, null is returned.

removeValve

public void removeValve(Valve valve)
Remove the specified Valve from the pipeline associated with this Container, if it is found; otherwise, do nothing.
Parameters:
valve - Valve to be removed


Copyright © 2000 Apache Software Foundation. All Rights Reserved.