Class JsonEntityProducer

  • All Implemented Interfaces:
    org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.nio.AsyncDataProducer, org.apache.hc.core5.http.nio.AsyncEntityProducer, org.apache.hc.core5.http.nio.ResourceHolder

    public final class JsonEntityProducer
    extends org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityProducer
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonEntityProducer​(com.google.gson.Gson gson, java.lang.Object value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int availableData()  
      void failed​(java.lang.Exception cause)  
      boolean isRepeatable()  
      protected void produceData​(org.apache.hc.core5.http.nio.StreamChannel<java.nio.CharBuffer> channel)  
      void releaseResources()  
      • Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityProducer

        available, getContentEncoding, getContentLength, getContentType, getTrailerNames, isChunked, produce
      • Methods inherited from class java.lang.Object

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

      • JsonEntityProducer

        public JsonEntityProducer​(com.google.gson.Gson gson,
                                  java.lang.Object value)
    • Method Detail

      • availableData

        protected int availableData()
        Specified by:
        availableData in class org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityProducer
      • produceData

        protected void produceData​(org.apache.hc.core5.http.nio.StreamChannel<java.nio.CharBuffer> channel)
                            throws java.io.IOException
        Specified by:
        produceData in class org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityProducer
        Throws:
        java.io.IOException
      • isRepeatable

        public boolean isRepeatable()
      • failed

        public void failed​(java.lang.Exception cause)
      • releaseResources

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