Class JsonEntityConsumer<T>
- java.lang.Object
-
- org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
-
- org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityConsumer<T>
-
- org.spongepowered.gradle.ore.internal.http.JsonEntityConsumer<T>
-
- All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer
,org.apache.hc.core5.http.nio.AsyncEntityConsumer<T>
,org.apache.hc.core5.http.nio.ResourceHolder
public final class JsonEntityConsumer<T> extends org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityConsumer<T>
-
-
Constructor Summary
Constructors Constructor Description JsonEntityConsumer(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<T> token)
JsonEntityConsumer(com.google.gson.Gson gson, java.lang.Class<T> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
capacityIncrement()
protected void
data(java.nio.CharBuffer src, boolean endOfStream)
protected T
generateContent()
void
releaseResources()
protected void
streamStart(org.apache.hc.core5.http.ContentType contentType)
-
Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityConsumer
completed, failed, getContent, streamStart
-
Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
consume, setCharset, streamEnd, updateCapacity
-
-
-
-
Method Detail
-
streamStart
protected void streamStart(org.apache.hc.core5.http.ContentType contentType) throws org.apache.hc.core5.http.HttpException
- Specified by:
streamStart
in classorg.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityConsumer<T>
- Throws:
org.apache.hc.core5.http.HttpException
-
generateContent
protected T generateContent() throws java.io.IOException
- Specified by:
generateContent
in classorg.apache.hc.core5.http.nio.entity.AbstractCharAsyncEntityConsumer<T>
- Throws:
java.io.IOException
-
capacityIncrement
protected int capacityIncrement()
- Specified by:
capacityIncrement
in classorg.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
-
data
protected void data(java.nio.CharBuffer src, boolean endOfStream)
- Specified by:
data
in classorg.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
-
releaseResources
public void releaseResources()
-
-