DefaultHttpRequestParser
@Deprecated @NotThreadSafe public class HttpRequestParser extends AbstractMessageParser<HttpMessage>
SessionInputBuffer
.
The following parameters can be used to customize the behavior of this class:
lineParser
Constructor and Description |
---|
HttpRequestParser(SessionInputBuffer buffer,
LineParser parser,
HttpRequestFactory requestFactory,
HttpParams params)
Deprecated.
Creates an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
protected HttpMessage |
parseHead(SessionInputBuffer sessionBuffer)
Deprecated.
Subclasses must override this method to generate an instance of
HttpMessage based on the initial input from the session buffer. |
parse, parseHeaders, parseHeaders
public HttpRequestParser(SessionInputBuffer buffer, LineParser parser, HttpRequestFactory requestFactory, HttpParams params)
buffer
- the session input buffer.parser
- the line parser.requestFactory
- the factory to use to create
HttpRequest
s.params
- HTTP parameters.protected HttpMessage parseHead(SessionInputBuffer sessionBuffer) throws java.io.IOException, HttpException, ParseException
AbstractMessageParser
HttpMessage
based on the initial input from the session buffer.
Usually this method is expected to read just the very first line or
the very first valid from the data stream and based on the input generate
an appropriate instance of HttpMessage
.
parseHead
in class AbstractMessageParser<HttpMessage>
sessionBuffer
- the session input buffer.java.io.IOException
- in case of an I/O error.HttpException
- in case of HTTP protocol violation.ParseException
- in case of a parse error.