Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.classic

public final Class ContentCompressionExec

extends Object
implements ExecChainHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.classic.ExecChainHandler
Annotations
@Contract
threading:STATELESS
@Internal
Imports
java.io.IOException, java.util.List, .Locale, org.apache.hc.client5.http.classic.ExecChain, .ExecChainHandler, org.apache.hc.client5.http.config.RequestConfig, org.apache.hc.client5.http.entity.BrotliDecompressingEntity, .BrotliInputStreamFactory, .DecompressingEntity, .DeflateInputStreamFactory, .GZIPInputStreamFactory, .InputStreamFactory, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.core5.annotation.Contract, .Internal, .ThreadingBehavior, org.apache.hc.core5.http.ClassicHttpRequest, .ClassicHttpResponse, .Header, .HeaderElement, .HttpEntity, .HttpException, .HttpHeaders, org.apache.hc.core5.http.config.Lookup, .RegistryBuilder, org.apache.hc.core5.http.message.BasicHeaderValueParser, .MessageSupport, .ParserCursor, org.apache.hc.core5.util.Args

Request execution handler in the classic request execution chain that is responsible for automatic response content decompression.

Further responsibilities such as communication with the opposite endpoint is delegated to the next executor in the request execution chain.

Since
5.0

Field Summary

Modifier and TypeField and Description
private final Header
private final Lookup<InputStreamFactory>
private static final String[]
EMPTY_STRING_ARRAY

An empty immutable String array.

private final boolean

Constructor Summary

AccessConstructor and Description
public
ContentCompressionExec(final List<String> acceptEncoding, final Lookup<InputStreamFactory> decoderRegistry, final boolean ignoreUnknown)

public
ContentCompressionExec(final boolean ignoreUnknown)

public
ContentCompressionExec()

Handles gzip and deflate compressed entities by using the following decoders:

Method Summary

Modifier and TypeMethod and Description
public ClassicHttpResponse
execute(final ClassicHttpRequest
the actual request.
request
,
final ExecChain.Scope
the execution scope .
scope
,
final ExecChain
the next element in the request execution chain.
chain
)

Implements org.apache.hc.client5.http.classic.ExecChainHandler.execute.

Executes the actual HTTP request.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

acceptEncodingback to summary
private final Header acceptEncoding
decoderRegistryback to summary
private final Lookup<InputStreamFactory> decoderRegistry
EMPTY_STRING_ARRAYback to summary
private static final String[] EMPTY_STRING_ARRAY

An empty immutable String array.

ignoreUnknownback to summary
private final boolean ignoreUnknown

Constructor Detail

ContentCompressionExecback to summary
public ContentCompressionExec(final List<String> acceptEncoding, final Lookup<InputStreamFactory> decoderRegistry, final boolean ignoreUnknown)
ContentCompressionExecback to summary
public ContentCompressionExec(final boolean ignoreUnknown)
ContentCompressionExecback to summary
public ContentCompressionExec()

Handles gzip and deflate compressed entities by using the following decoders:

Method Detail

executeback to summary
public ClassicHttpResponse execute(final ClassicHttpRequest request, final ExecChain.Scope scope, final ExecChain chain) throws IOException, HttpException

Implements org.apache.hc.client5.http.classic.ExecChainHandler.execute.

Doc from org.apache.hc.client5.http.classic.ExecChainHandler.execute.

Executes the actual HTTP request. The handler can choose to return a response message or delegate request execution to the next element in the execution chain.

Parameters
request:ClassicHttpRequest

the actual request.

scope:ExecChain.Scope

the execution scope .

chain:ExecChain

the next element in the request execution chain.

Annotations
@Override