@Contract(threading=STATELESS)
public interface ExecChainHandler
Important: please note it is required for decorators that implement post execution aspects
or response post-processing of any sort to release resources associated with the response
by calling Closeable.close()
methods in case of an I/O, protocol or
runtime exception, or in case the response is not propagated to the caller.
For information regarding the handler chain behaviour in case of a request re-execution,
please refer to the HttpRequestRetryExec
javadoc.
Well known request execution handlers could be referred to by name using one of the
ChainElement
enum values.
ChainElement
,
HttpClientBuilder.addExecInterceptorFirst(String, ExecChainHandler)
,
HttpClientBuilder.addExecInterceptorBefore(String, String, ExecChainHandler)
,
HttpClientBuilder.addExecInterceptorAfter(String, String, ExecChainHandler)
,
HttpClientBuilder.addExecInterceptorLast(String, ExecChainHandler)
Modifier and Type | Method and Description |
---|---|
org.apache.hc.core5.http.ClassicHttpResponse |
execute(org.apache.hc.core5.http.ClassicHttpRequest request,
ExecChain.Scope scope,
ExecChain chain)
Executes the actual HTTP request.
|
org.apache.hc.core5.http.ClassicHttpResponse execute(org.apache.hc.core5.http.ClassicHttpRequest request, ExecChain.Scope scope, ExecChain chain) throws IOException, org.apache.hc.core5.http.HttpException
request
- the actual request.scope
- the execution scope .chain
- the next element in the request execution chain.IOException
org.apache.hc.core5.http.HttpException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.