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

  • Type Parameters:
    T - represents HttpMessage
    All Known Implementing Classes:
    DefaultH2RequestConverter, DefaultH2ResponseConverter

    public interface H2MessageConverter<T extends org.apache.hc.core5.http.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<org.apache.hc.core5.http.Header> headers)
      Converts given list of HTTP/2 headers to a HttpMessage.
      java.util.List<org.apache.hc.core5.http.Header> convert​(T message)
      Converts given HttpMessage to a list of HTTP/2 headers.
    • Method Detail

      • convert

        T convert​(java.util.List<org.apache.hc.core5.http.Header> headers)
           throws org.apache.hc.core5.http.HttpException
        Converts given list of HTTP/2 headers to a HttpMessage.
        Parameters:
        headers - list of HTTP/2 headers
        Returns:
        HTTP message
        Throws:
        org.apache.hc.core5.http.HttpException - in case of HTTP protocol violation
      • convert

        java.util.List<org.apache.hc.core5.http.Header> convert​(T message)
                                                         throws org.apache.hc.core5.http.HttpException
        Converts given HttpMessage to a list of HTTP/2 headers.
        Parameters:
        message - HTTP message
        Returns:
        list of HTTP/2 headers
        Throws:
        org.apache.hc.core5.http.HttpException - in case of HTTP protocol violation