Class AsyncJsonServerPipeline.ResponseContentStage<I>
java.lang.Object
org.apache.hc.core5.jackson2.http.AsyncJsonServerPipeline.ResponseContentStage<I>
- Enclosing class:
- AsyncJsonServerPipeline
Response content generation stage.
-
Method Summary
Modifier and TypeMethodDescriptionAsyncJsonServerPipeline.RequestHandlingStage<I,Message<HttpResponse, com.fasterxml.jackson.databind.JsonNode>> Configures the pipeline to represent the response message content as an object.Configures the pipeline to represent the response message content as an object with the givenClass.asSequence(ObjectProducer<O> objectProducer) Configures the pipeline to represent the response message content as a sequence of objects.produce(Resolver<O, AsyncResponseProducer> responseProducerResolver) ResolvesAsyncResponseProducerto be used by the pipeline to generate the outgoing response message stream based on the given response message object.produceContent(Resolver<O, AsyncEntityProducer> dataProducerResolver) ResolvesAsyncEntityProducerto be used by the pipeline to generate the outgoing response content stream based on the given response content object.
-
Method Details
-
produce
public <O> AsyncJsonServerPipeline.RequestHandlingStage<I,O> produce(Resolver<O, AsyncResponseProducer> responseProducerResolver) ResolvesAsyncResponseProducerto be used by the pipeline to generate the outgoing response message stream based on the given response message object.- Type Parameters:
O- response content representation.
-
produceContent
public <O> AsyncJsonServerPipeline.RequestHandlingStage<I,Message<HttpResponse, produceContentO>> (Resolver<O, AsyncEntityProducer> dataProducerResolver) ResolvesAsyncEntityProducerto be used by the pipeline to generate the outgoing response content stream based on the given response content object.- Type Parameters:
O- response content representation.
-
asObject
public <O> AsyncJsonServerPipeline.RequestHandlingStage<I,Message<HttpResponse, asObjectO>> (Class<O> clazz) Configures the pipeline to represent the response message content as an object with the givenClass. -
asJsonNode
public AsyncJsonServerPipeline.RequestHandlingStage<I,Message<HttpResponse, asJsonNode()com.fasterxml.jackson.databind.JsonNode>> Configures the pipeline to represent the response message content as an object. -
asSequence
public <O> AsyncJsonServerPipeline.RequestHandlingStage<I,HttpResponse> asSequence(ObjectProducer<O> objectProducer) Configures the pipeline to represent the response message content as a sequence of objects.
-