Class DefaultHttpResponseParser<T extends HttpResponse>
java.lang.Object
org.apache.hc.core5.http.impl.nio.AbstractMessageParser<T>
org.apache.hc.core5.http.impl.nio.DefaultHttpResponseParser<T>
- All Implemented Interfaces:
NHttpMessageParser<T>
Default
NHttpMessageParser
implementation for HttpResponse
s.- Since:
- 4.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultHttpResponseParser
(HttpResponseFactory<T> responseFactory) DefaultHttpResponseParser
(HttpResponseFactory<T> responseFactory, Http1Config http1Config) DefaultHttpResponseParser
(HttpResponseFactory<T> responseFactory, LineParser parser, Http1Config http1Config) Creates an instance of DefaultHttpResponseParser. -
Method Summary
Modifier and TypeMethodDescriptionprotected T
createMessage
(CharArrayBuffer buffer) CreatesHttpMessage
instance based on the content of the input buffer containing the first line of the incoming HTTP message.Methods inherited from class org.apache.hc.core5.http.impl.nio.AbstractMessageParser
getLineParser, parse, reset
-
Field Details
-
responseFactory
-
-
Constructor Details
-
DefaultHttpResponseParser
public DefaultHttpResponseParser(HttpResponseFactory<T> responseFactory, LineParser parser, Http1Config http1Config) Creates an instance of DefaultHttpResponseParser.- Parameters:
responseFactory
- the response factory.parser
- the line parser. Ifnull
LazyLineParser.INSTANCE
will be used.http1Config
- Message http1Config. Ifnull
Http1Config.DEFAULT
will be used.- Since:
- 4.3
-
DefaultHttpResponseParser
- Since:
- 4.3
-
DefaultHttpResponseParser
- Since:
- 4.3
-
-
Method Details
-
createMessage
Description copied from class:AbstractMessageParser
CreatesHttpMessage
instance based on the content of the input buffer containing the first line of the incoming HTTP message.- Specified by:
createMessage
in classAbstractMessageParser<T extends HttpResponse>
- Parameters:
buffer
- the line buffer.- Returns:
- HTTP message.
- Throws:
HttpException
- in case of HTTP protocol violation
-