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 Details

    • fallback

      private final AsyncExecCallback fallback
    • backendResponse

      private final org.apache.hc.core5.http.HttpResponse backendResponse
    • entityDetails

      private final org.apache.hc.core5.http.EntityDetails entityDetails
    • writtenThrough

      private final AtomicBoolean writtenThrough
    • bufferRef

      private final AtomicReference<org.apache.hc.core5.util.ByteArrayBuffer> bufferRef
    • dataConsumerRef

      private final AtomicReference<org.apache.hc.core5.http.nio.AsyncDataConsumer> 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 interface org.apache.hc.core5.http.nio.AsyncDataConsumer
      Throws:
      IOException
    • consume

      public final void consume(ByteBuffer src) throws IOException
      Specified by:
      consume in interface org.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 interface org.apache.hc.core5.http.nio.AsyncDataConsumer
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • releaseResources

      public void releaseResources()
      Specified by:
      releaseResources in interface org.apache.hc.core5.http.nio.ResourceHolder