Top Description Fields Constructors Methods
org.apache.hc.core5.http.impl.nio

public Class DefaultHttpResponseParser<T extends org.apache.hc.core5.http.HttpResponse>

extends AbstractMessageParser<T extends HttpResponse>
Class Inheritance
Imports
org.apache.hc.core5.http.HttpException, .HttpResponse, .HttpResponseFactory, org.apache.hc.core5.http.config.Http1Config, org.apache.hc.core5.http.message.LineParser, .StatusLine, org.apache.hc.core5.util.Args, .CharArrayBuffer

Default org.apache.hc.core5.http.nio.NHttpMessageParser implementation for HttpResponses.
Since
4.1

Field Summary

Modifier and TypeField and Description
private final HttpResponseFactory<T>

Constructor Summary

AccessConstructor and Description
public
DefaultHttpResponseParser(final HttpResponseFactory<T>
the response factory.
responseFactory
,
final LineParser
the line parser. If null org.apache.hc.core5.http.message.LazyLineParser#INSTANCE will be used.
parser
,
final Http1Config
Message http1Config. If null Http1Config#DEFAULT will be used.
http1Config
)

Creates an instance of DefaultHttpResponseParser.

public
DefaultHttpResponseParser(final HttpResponseFactory<T> responseFactory, final Http1Config http1Config)

public

Method Summary

Modifier and TypeMethod and Description
protected T
createMessage(final CharArrayBuffer
the line buffer.
buffer
)

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractMessageParser.createMessage.

Creates HttpMessage instance based on the content of the input buffer containing the first line of the incoming HTTP message.
Inherited from org.apache.hc.core5.http.impl.nio.AbstractMessageParser:
getLineParserparsereset

Field Detail

responseFactoryback to summary
private final HttpResponseFactory<T> responseFactory

Constructor Detail

DefaultHttpResponseParserback to summary
public DefaultHttpResponseParser(final HttpResponseFactory<T> responseFactory, final LineParser parser, final Http1Config http1Config)

Creates an instance of DefaultHttpResponseParser.

Parameters
responseFactory:HttpResponseFactory<T>

the response factory.

parser:LineParser

the line parser. If null org.apache.hc.core5.http.message.LazyLineParser#INSTANCE will be used.

http1Config:Http1Config

Message http1Config. If null Http1Config#DEFAULT will be used.

Since
4.3
DefaultHttpResponseParserback to summary
public DefaultHttpResponseParser(final HttpResponseFactory<T> responseFactory, final Http1Config http1Config)
Since
4.3
DefaultHttpResponseParserback to summary
public DefaultHttpResponseParser(final HttpResponseFactory<T> responseFactory)
Since
4.3

Method Detail

createMessageback to summary
protected T createMessage(final CharArrayBuffer buffer) throws HttpException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractMessageParser.createMessage.

Doc from org.apache.hc.core5.http.impl.nio.AbstractMessageParser.createMessage.

Creates HttpMessage instance based on the content of the input buffer containing the first line of the incoming HTTP message.

Parameters
buffer:CharArrayBuffer

the line buffer.

Returns:T

HTTP message.

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation