Class 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 java.lang.Object
    implements org.apache.hc.core5.http.nio.AsyncDataConsumer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.hc.core5.http.HttpResponse backendResponse  
      private java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.util.ByteArrayBuffer> bufferRef  
      private java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.http.nio.AsyncDataConsumer> dataConsumerRef  
      private org.apache.hc.core5.http.EntityDetails entityDetails  
      private AsyncExecCallback fallback  
      private java.util.concurrent.atomic.AtomicBoolean writtenThrough  
    • Constructor Summary

      Constructors 
      Constructor Description
      CachingAsyncDataConsumer​(AsyncExecCallback fallback, org.apache.hc.core5.http.HttpResponse backendResponse, org.apache.hc.core5.http.EntityDetails entityDetails)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void consume​(java.nio.ByteBuffer src)  
      void releaseResources()  
      void streamEnd​(java.util.List<? extends org.apache.hc.core5.http.Header> trailers)  
      void updateCapacity​(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • backendResponse

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

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

        private final java.util.concurrent.atomic.AtomicBoolean writtenThrough
      • bufferRef

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

        private final java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.http.nio.AsyncDataConsumer> dataConsumerRef
    • Constructor Detail

      • CachingAsyncDataConsumer

        CachingAsyncDataConsumer​(AsyncExecCallback fallback,
                                 org.apache.hc.core5.http.HttpResponse backendResponse,
                                 org.apache.hc.core5.http.EntityDetails entityDetails)
    • Method Detail

      • updateCapacity

        public final void updateCapacity​(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel)
                                  throws java.io.IOException
        Specified by:
        updateCapacity in interface org.apache.hc.core5.http.nio.AsyncDataConsumer
        Throws:
        java.io.IOException
      • consume

        public final void consume​(java.nio.ByteBuffer src)
                           throws java.io.IOException
        Specified by:
        consume in interface org.apache.hc.core5.http.nio.AsyncDataConsumer
        Throws:
        java.io.IOException
      • streamEnd

        public final void streamEnd​(java.util.List<? extends org.apache.hc.core5.http.Header> trailers)
                             throws org.apache.hc.core5.http.HttpException,
                                    java.io.IOException
        Specified by:
        streamEnd in interface org.apache.hc.core5.http.nio.AsyncDataConsumer
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException
      • releaseResources

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