public class DefaultHttpRequestParser extends AbstractMessageParser<ClassicHttpRequest>
SessionInputBuffer.| Constructor and Description | 
|---|
| DefaultHttpRequestParser() | 
| DefaultHttpRequestParser(Http1Config http1Config) | 
| DefaultHttpRequestParser(LineParser lineParser,
                        HttpRequestFactory<ClassicHttpRequest> requestFactory,
                        Http1Config http1Config)Creates new instance of DefaultHttpRequestParser. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected IOException | createConnectionClosedException()Subclasses must override this method to generate an appropriate exception
 in case of unexpected connection termination by the peer endpoint. | 
| protected ClassicHttpRequest | createMessage(CharArrayBuffer buffer)Subclasses must override this method to generate an instance of
  HttpMessagebased on the initial input from the session buffer. | 
| ClassicHttpRequest | parse(SessionInputBuffer buffer,
     InputStream inputStream)Generates an instance of  MessageHeadersfrom the given input stream.. | 
parseHeaders, parseHeaderspublic DefaultHttpRequestParser(LineParser lineParser, HttpRequestFactory<ClassicHttpRequest> requestFactory, Http1Config http1Config)
lineParser - the line parser. If null
   LazyLineParser.INSTANCE will be used.requestFactory - the response factory. If null
   DefaultClassicHttpRequestFactory.INSTANCE will be used.http1Config - the message http1Config. If null
   Http1Config.DEFAULT will be used.public DefaultHttpRequestParser(Http1Config http1Config)
public DefaultHttpRequestParser()
protected IOException createConnectionClosedException()
AbstractMessageParsercreateConnectionClosedException in class AbstractMessageParser<ClassicHttpRequest>public ClassicHttpRequest parse(SessionInputBuffer buffer, InputStream inputStream) throws IOException, HttpException
HttpMessageParserMessageHeaders from the given input stream..parse in interface HttpMessageParser<ClassicHttpRequest>parse in class AbstractMessageParser<ClassicHttpRequest>buffer - Session input bufferinputStream - Input streamIOException - in case of an I/O errorHttpException - in case of HTTP protocol violationprotected ClassicHttpRequest createMessage(CharArrayBuffer buffer) throws IOException, HttpException
AbstractMessageParserHttpMessage 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–2022 The Apache Software Foundation. All rights reserved.