things.data.processing.http
Class HttpRequestProcessor

java.lang.Object
  extended by things.data.processing.http.HttpRequestProcessor

public class HttpRequestProcessor
extends java.lang.Object

A request processor. It handles just GET and POST for now.

This implementation assumes 8-bit characters throughout the header.

It only supports application/x-www-form-urlencoded bodies. We don't actually verify that is the format too! (Just that it isn't multipart).

Version:
1.0

Version History

EPG - Initial - 13 FEB 07
 
Author:
Erich P. Gatejen

Constructor Summary
HttpRequestProcessor()
           
 
Method Summary
 HttpRequest process(java.io.InputStream input)
          Process a request from a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestProcessor

public HttpRequestProcessor()
                     throws java.lang.Throwable
Throws:
java.lang.Throwable
Method Detail

process

public HttpRequest process(java.io.InputStream input)
                    throws ThingsException,
                           java.lang.InterruptedException,
                           java.io.IOException
Process a request from a stream. This implementation is memory intensive.

Only one thread per object at a time, so we synchronize it.

Parameters:
input - the source input. It should be buffered already.
Returns:
the request
Throws:
ThingsException - for any problem not related to the input source. Check the level to decide how fatal it is.
java.io.IOException - if the input source has a problem. You can assume it is dead.
java.lang.InterruptedException
See Also:
HttpRequest


Things.