Class JsonNodeSequenceEntityConsumer
java.lang.Object
org.apache.hc.core5.jackson2.http.JsonNodeSequenceEntityConsumer
- All Implemented Interfaces:
AsyncDataConsumer,AsyncEntityConsumer<Long>,ResourceHolder
AsyncEntityConsumer implementation that
converts incoming HTTP message entity into a sequence of JsonNode instance
and passes those objects to the JsonResultSink.- Since:
- 5.5
-
Constructor Summary
ConstructorsConstructorDescriptionJsonNodeSequenceEntityConsumer(com.fasterxml.jackson.databind.ObjectMapper objectMapper, JsonResultSink<com.fasterxml.jackson.databind.JsonNode> resultSink) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidconsume(ByteBuffer data) protected JsonTokenConsumercreateJsonTokenConsumer(Consumer<Long> resultConsumer) final voidfinal Longvoidfinal voidfinal voidstreamStart(EntityDetails entityDetails, FutureCallback<Long> resultCallback) final voidupdateCapacity(CapacityChannel capacityChannel)
-
Constructor Details
-
JsonNodeSequenceEntityConsumer
public JsonNodeSequenceEntityConsumer(com.fasterxml.jackson.databind.ObjectMapper objectMapper, JsonResultSink<com.fasterxml.jackson.databind.JsonNode> resultSink)
-
-
Method Details
-
createJsonTokenConsumer
-
streamStart
public final void streamStart(EntityDetails entityDetails, FutureCallback<Long> resultCallback) throws HttpException, IOException - Specified by:
streamStartin interfaceAsyncEntityConsumer<T>- Throws:
HttpExceptionIOException
-
updateCapacity
- Specified by:
updateCapacityin interfaceAsyncDataConsumer- Throws:
IOException
-
consume
- Specified by:
consumein interfaceAsyncDataConsumer- Throws:
IOException
-
streamEnd
- Specified by:
streamEndin interfaceAsyncDataConsumer- Throws:
HttpExceptionIOException
-
failed
- Specified by:
failedin interfaceAsyncEntityConsumer<T>
-
getContent
- Specified by:
getContentin interfaceAsyncEntityConsumer<T>
-
releaseResources
public void releaseResources()- Specified by:
releaseResourcesin interfaceResourceHolder
-