Class H2RequestPriority
- java.lang.Object
-
- org.apache.hc.client5.http.protocol.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.HttpRequestInterceptorAdds thePriorityrequest header to HTTP/2+ requests when a per-request priority is configured.The priority is taken from
RequestConfig.getH2Priority(). If aPriorityheader 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
-
-
Field Summary
Fields Modifier and Type Field Description static H2RequestPriorityINSTANCESingleton instance.
-
Constructor Summary
Constructors Constructor Description H2RequestPriority()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocess(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context)
-
-
-
Field Detail
-
INSTANCE
public static final H2RequestPriority INSTANCE
Singleton instance.
-
-
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:
processin interfaceorg.apache.hc.core5.http.HttpRequestInterceptor- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
-