Class H2RequestPriority

  • All Implemented Interfaces:
    org.apache.hc.core5.http.HttpRequestInterceptor

    @Experimental
    @Contract(threading=IMMUTABLE)
    public final class H2RequestPriority
    extends java.lang.Object
    implements org.apache.hc.core5.http.HttpRequestInterceptor
    Adds the Priority request header to HTTP/2+ requests when a per-request priority is configured.

    The priority is taken from RequestConfig.getH2Priority(). If a Priority header is already present on the request, it is left unchanged. If formatting the configured value yields an empty string (e.g., because it encodes protocol defaults), the header is not added.

    Since:
    5.6
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void process​(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • H2RequestPriority

        public H2RequestPriority()
    • Method Detail

      • process

        public void process​(org.apache.hc.core5.http.HttpRequest request,
                            org.apache.hc.core5.http.EntityDetails entity,
                            org.apache.hc.core5.http.protocol.HttpContext context)
                     throws org.apache.hc.core5.http.HttpException,
                            java.io.IOException
        Specified by:
        process in interface org.apache.hc.core5.http.HttpRequestInterceptor
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException