public class DefaultHttpResponseParser extends AbstractMessageParser<ClassicHttpResponse>
SessionInputBuffer.| Constructor and Description |
|---|
DefaultHttpResponseParser() |
DefaultHttpResponseParser(Http1Config http1Config) |
DefaultHttpResponseParser(LineParser lineParser,
HttpResponseFactory<ClassicHttpResponse> responseFactory,
Http1Config http1Config)
Creates new instance of DefaultHttpResponseParser.
|
| 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 ClassicHttpResponse |
createMessage(CharArrayBuffer buffer)
Subclasses must override this method to generate an instance of
HttpMessage based on the initial input from the session buffer. |
parse, parseHeaders, parseHeaderspublic DefaultHttpResponseParser(LineParser lineParser, HttpResponseFactory<ClassicHttpResponse> responseFactory, Http1Config http1Config)
lineParser - the line parser. If null
LazyLineParser.INSTANCE will be usedresponseFactory - the response factory. If null
DefaultClassicHttpResponseFactory.INSTANCE will be used.http1Config - the message http1Config. If null
Http1Config.DEFAULT will be used.public DefaultHttpResponseParser(Http1Config http1Config)
public DefaultHttpResponseParser()
protected IOException createConnectionClosedException()
AbstractMessageParsercreateConnectionClosedException in class AbstractMessageParser<ClassicHttpResponse>protected ClassicHttpResponse 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<ClassicHttpResponse>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.