Class JsonObjectEntityProducer<T>

java.lang.Object
org.apache.hc.core5.jackson2.http.JsonObjectEntityProducer<T>
Type Parameters:
T - type of objects used by this class.
All Implemented Interfaces:
EntityDetails, AsyncDataProducer, AsyncEntityProducer, ResourceHolder

public class JsonObjectEntityProducer<T> extends Object
AsyncEntityProducer implementation that generates a message body containing serialized content of the given JSON object.
Since:
5.5
  • Constructor Details

    • JsonObjectEntityProducer

      public JsonObjectEntityProducer(T jsonObject, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ContentType contentType)
      Creates a new instance that serializes the given object using the specified content type. If contentType is null, defaults to application/json.
      Parameters:
      jsonObject - the object to serialize.
      objectMapper - the object mapper.
      contentType - the content type, or null for application/json.
      Since:
      5.5
    • JsonObjectEntityProducer

      public JsonObjectEntityProducer(T jsonObject, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details