simple.http
Interface PipelineHandler


public interface PipelineHandler

The PipelineHandler interface is used to represent an object that handles Pipeline objects in sequence with a ProtocolHandler. This seperates the concrete implementation class from the abstraction.

This PipelineHandler interface represents an object that is used to process Pipeline objects. The intended use of this is that it be used in conjunction with an implementation of a ProtocolHandler implementation. The design is such that this will generate Request and Response objects which will be passed to the ProtocolHandler for processing.

The PipelineHandler implementation may employ a method of handling the Pipeline in such a way that when the InputStream does not produce any information for a certain length of time the connection is severed to recover file descriptors and other resources occupied by the possibly dead connection.

Author:
Niall Gallagher

Method Summary
 void process(Pipeline pipe)
          Used to process the Pipeline which is a full duplex communication link which may contain several http requests.
 

Method Detail

process

void process(Pipeline pipe)
             throws java.io.IOException,
                    java.lang.InterruptedException
Used to process the Pipeline which is a full duplex communication link which may contain several http requests. This will be used to read the requests from the Pipeline and to pass these requests to a ProtocolHandler for processing.

This will process the Pipeline and produce the HTTP Request and Response implementations that will be given to a ProtocolHandler.

Parameters:
pipe - this is the Pipeline to be processed
Throws:
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown on an interrupt