Package org.apache.hc.core5.http2
Interface H2MessageConverter<T extends HttpMessage>
-
- Type Parameters:
T
- representsHttpMessage
- All Known Implementing Classes:
DefaultH2RequestConverter
,DefaultH2ResponseConverter
public interface H2MessageConverter<T extends 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
convert(java.util.List<Header> headers)
Converts given list of HTTP/2 headers to aHttpMessage
.java.util.List<Header>
convert(T message)
Converts givenHttpMessage
to a list of HTTP/2 headers.
-
-
-
Method Detail
-
convert
T convert(java.util.List<Header> headers) throws HttpException
Converts given list of HTTP/2 headers to aHttpMessage
.- Parameters:
headers
- list of HTTP/2 headers- Returns:
- HTTP message
- Throws:
HttpException
- in case of HTTP protocol violation
-
convert
java.util.List<Header> convert(T message) throws HttpException
Converts givenHttpMessage
to a list of HTTP/2 headers.- Parameters:
message
- HTTP message- Returns:
- list of HTTP/2 headers
- Throws:
HttpException
- in case of HTTP protocol violation
-
-