Class BufferedByteConsumer

java.lang.Object
org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
co.elastic.clients.transport.rest5_client.low_level.BufferedByteConsumer
All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>, org.apache.hc.core5.http.nio.ResourceHolder

public class BufferedByteConsumer extends org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer implements org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferedByteConsumer(int bufferLimit)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected int
     
    protected final void
     
    protected void
    data(ByteBuffer src, boolean endOfStream)
     
    final void
     
    org.apache.hc.core5.http.io.entity.ByteArrayEntity
     
    void
     
    void
    streamStart(org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.io.entity.ByteArrayEntity> resultCallback)
     

    Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer

    consume, streamEnd, updateCapacity

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer

    consume, streamEnd, updateCapacity
  • Constructor Details

    • BufferedByteConsumer

      public BufferedByteConsumer(int bufferLimit)
  • Method Details

    • streamStart

      public void streamStart(org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.io.entity.ByteArrayEntity> resultCallback)
      Specified by:
      streamStart in interface org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
    • capacityIncrement

      protected int capacityIncrement()
      Specified by:
      capacityIncrement in class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
    • data

      protected void data(ByteBuffer src, boolean endOfStream) throws org.apache.hc.core5.http.ContentTooLongException
      Specified by:
      data in class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
      Throws:
      org.apache.hc.core5.http.ContentTooLongException
    • completed

      protected final void completed() throws IOException
      Specified by:
      completed in class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
      Throws:
      IOException
    • getContent

      public org.apache.hc.core5.http.io.entity.ByteArrayEntity getContent()
      Specified by:
      getContent in interface org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
    • failed

      public final void failed(Exception cause)
      Specified by:
      failed in interface org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
    • releaseResources

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