public class DefaultHttpRequestParser extends AbstractMessageParser<ClassicHttpRequest>
SessionInputBuffer
.Constructor and Description |
---|
DefaultHttpRequestParser() |
DefaultHttpRequestParser(Http1Config http1Config) |
DefaultHttpRequestParser(Http1Config http1Config,
LineParser lineParser,
HttpRequestFactory<ClassicHttpRequest> requestFactory) |
DefaultHttpRequestParser(LineParser lineParser,
HttpRequestFactory<ClassicHttpRequest> requestFactory,
Http1Config http1Config)
|
Modifier and Type | Method and Description |
---|---|
protected ClassicHttpRequest |
createMessage(CharArrayBuffer buffer)
Subclasses must override this method to generate an instance of
HttpMessage based on the initial input from the session buffer. |
ClassicHttpRequest |
parse(SessionInputBuffer buffer,
InputStream inputStream)
Generates an instance of
MessageHeaders from the given input stream.. |
createConnectionClosedException, parseHeaders, parseHeaders
public DefaultHttpRequestParser(Http1Config http1Config, LineParser lineParser, HttpRequestFactory<ClassicHttpRequest> requestFactory)
@Deprecated public DefaultHttpRequestParser(LineParser lineParser, HttpRequestFactory<ClassicHttpRequest> requestFactory, Http1Config http1Config)
public DefaultHttpRequestParser(Http1Config http1Config)
public DefaultHttpRequestParser()
public ClassicHttpRequest parse(SessionInputBuffer buffer, InputStream inputStream) throws IOException, HttpException
HttpMessageParser
MessageHeaders
from the given input stream..parse
in interface HttpMessageParser<ClassicHttpRequest>
parse
in class AbstractMessageParser<ClassicHttpRequest>
buffer
- Session input bufferinputStream
- Input streamnull
if the input stream has been
closed by the opposite endpoint.IOException
- in case of an I/O errorHttpException
- in case of HTTP protocol violationprotected ClassicHttpRequest createMessage(CharArrayBuffer buffer) throws IOException, HttpException
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
.
createMessage
in class AbstractMessageParser<ClassicHttpRequest>
buffer
- the session input buffer.IOException
- in case of an I/O error.HttpException
- in case of HTTP protocol violation.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.