Interface Pipeline

All Known Implementing Classes:
DefaultPipeline

public interface Pipeline
The idea of a pipeline is being taken from Catalina in its entirety :-) I would like to take the idea further and implement Valves instead of hardcoding particular methods in a pipeline. It would be more flexible to specify Valves for a pipeline in an XML file (we can also rip off the digester rules from T4) and have invoke() as part of the interface. So a set of Valves would be added to the pipeline and the pipeline would 'invoke' each valve. In the case Turbine each Valve would produce some output to be sent out the pipe.
Author:
Jason van Zyl, Daniel Rall, Peter Courcoux
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    DOCUMENT ME!
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addValve(Valve valve)
    Add a new Valve to the end of the pipeline.
    Return the pipeline's name.
    Return the set of all Valves in the pipeline.
    void
    Initializes this instance.
    void
    invoke(PipelineData pipelineData)
    Cause the specified request and response to be processed by the sequence of Valves associated with this pipeline, until one of these Valves decides to end the processing.
    void
    Remove the specified Valve from the pipeline, if it is found; otherwise, do nothing.
    void
    DOCUMENT ME!
  • Field Details

  • Method Details

    • getName

      String getName()
      Return the pipeline's name.
    • setName

      void setName(String name)
      DOCUMENT ME!
      Parameters:
      name - DOCUMENT ME!
    • initialize

      void initialize() throws Exception
      Initializes this instance. Called once by the Turbine servlet.
      Throws:
      Exception
    • addValve

      void addValve(Valve valve)

      Add a new Valve to the end of the pipeline.

      Parameters:
      valve - Valve to be added.
      Throws:
      IllegalStateException - If the pipeline has not been initialized.
    • getValves

      Valve[] getValves()
      Return the set of all Valves in the pipeline. If there are no such Valves, a zero-length array is returned.
      Returns:
      An array of valves.
    • invoke

      void invoke(PipelineData pipelineData) throws IOException, PipelineException

      Cause the specified request and response to be processed by the sequence of Valves associated with this pipeline, until one of these Valves decides to end the processing.

      The implementation must ensure that multiple simultaneous requests (on different threads) can be processed through the same Pipeline without interfering with each other's control flow.

      Parameters:
      pipelineData - run-time information pipelineData,
      Throws:
      IOException - an input/output error occurred.
      PipelineException
    • removeValve

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