I'm not sure i underestand preProcess( ) and what it gets us.

I like the model that

1. The URL path selectes the RequestHandler
2. RequestParser = RequestHandler.getRequestParser()  (typically from
its default params)
3. SolrRequest = RequestParser.parse( HttpServletRequest )
4. handler.handleRequest( req, res );
5. write the response

If anyone needs to customize this chain of events, they could easily
write their own Servlet/Filter


On 1/17/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:

Acctually, i have to amend that ... it occured to me in my slep last night
that calling HttpServletRequest.getInputStream() wasn't safe unless we
*now* the Requestparser wasnts it, and will close it if it's non-null, so
the API for preProcess would need to look more like this...

     interface Pointer<T> {
       T get();
     }
     interface RequestParser {
       ...
       /** the will be passed a "Pointer" to the raw input stream from the
        * HttpServletRequest, ... if this method accesses the IputStream
        * from the pointer, it is required to close it if it is non-null.
        */
       public Iterable<ContentStream> preProcess(SolrParam headers,
                                                 Pointer<InputStream> s);
       ...
     }



-Hoss


Reply via email to