Class AsyncCachingExec.CachingAsyncDataConsumer
java.lang.Object
org.apache.hc.client5.http.impl.cache.AsyncCachingExec.CachingAsyncDataConsumer
- All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer
,org.apache.hc.core5.http.nio.ResourceHolder
- Enclosing class:
AsyncCachingExec
class AsyncCachingExec.CachingAsyncDataConsumer
extends Object
implements org.apache.hc.core5.http.nio.AsyncDataConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hc.core5.http.HttpResponse
private final AtomicReference
<org.apache.hc.core5.util.ByteArrayBuffer> private final AtomicReference
<org.apache.hc.core5.http.nio.AsyncDataConsumer> private final org.apache.hc.core5.http.EntityDetails
private final AsyncExecCallback
private final AtomicBoolean
-
Constructor Summary
ConstructorsConstructorDescriptionCachingAsyncDataConsumer
(AsyncExecCallback fallback, org.apache.hc.core5.http.HttpResponse backendResponse, org.apache.hc.core5.http.EntityDetails entityDetails) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
consume
(ByteBuffer src) void
final void
final void
updateCapacity
(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel)
-
Field Details
-
fallback
-
backendResponse
private final org.apache.hc.core5.http.HttpResponse backendResponse -
entityDetails
private final org.apache.hc.core5.http.EntityDetails entityDetails -
writtenThrough
-
bufferRef
-
dataConsumerRef
-
-
Constructor Details
-
CachingAsyncDataConsumer
CachingAsyncDataConsumer(AsyncExecCallback fallback, org.apache.hc.core5.http.HttpResponse backendResponse, org.apache.hc.core5.http.EntityDetails entityDetails)
-
-
Method Details
-
updateCapacity
public final void updateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel) throws IOException - Specified by:
updateCapacity
in interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer
- Throws:
IOException
-
consume
- Specified by:
consume
in interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer
- Throws:
IOException
-
streamEnd
public final void streamEnd(List<? extends org.apache.hc.core5.http.Header> trailers) throws org.apache.hc.core5.http.HttpException, IOException - Specified by:
streamEnd
in interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer
- Throws:
org.apache.hc.core5.http.HttpException
IOException
-
releaseResources
public void releaseResources()- Specified by:
releaseResources
in interfaceorg.apache.hc.core5.http.nio.ResourceHolder
-