Top Description Methods
org.apache.hc.core5.http2

public Interface H2MessageConverter<T extends org.apache.hc.core5.http.HttpMessage>

Known Direct Implementers
org.apache.hc.core5.http2.impl.DefaultH2RequestConverter, org.apache.hc.core5.http2.impl.DefaultH2ResponseConverter
Type Parameters
<T>
represents HttpMessage
Imports
java.util.List, org.apache.hc.core5.http.Header, .HttpException, .HttpMessage

Abstract message converter intended to convert from a list of HTTP/2 headers to object representing an HTTP message and from an object representing an HTTP message to a list of HTTP/2 headers.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

HTTP message
convert
(List<Header>
list of HTTP/2 headers
headers
)

Converts given list of HTTP/2 headers to a HttpMessage.

public List<Header>

Returns:

list of HTTP/2 headers
convert
(T
HTTP message
message
)

Converts given HttpMessage to a list of HTTP/2 headers.

Method Detail

convertback to summary
public T convert(List<Header> headers) throws HttpException

Converts given list of HTTP/2 headers to a HttpMessage.

Parameters
headers:List<Header>

list of HTTP/2 headers

Returns:T

HTTP message

Exceptions
HttpException:
in case of HTTP protocol violation
convertback to summary
public List<Header> convert(T message) throws HttpException

Converts given HttpMessage to a list of HTTP/2 headers.

Parameters
message:T

HTTP message

Returns:List<Header>

list of HTTP/2 headers

Exceptions
HttpException:
in case of HTTP protocol violation