Class AsyncServerPipeline.ResponseContentStage<I>
- java.lang.Object
-
- org.apache.hc.core5.http.nio.support.AsyncServerPipeline.ResponseContentStage<I>
-
- Enclosing class:
- AsyncServerPipeline
public static class AsyncServerPipeline.ResponseContentStage<I> extends java.lang.ObjectResponse content generation stage.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,byte[]>>asByteArray(ContentType contentType)Configures the pipeline to represent the response message content as byre array.AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,java.lang.String>>asString(ContentType contentType)Configures the pipeline to represent the response message content as a String.<O> AsyncServerPipeline.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.<O> AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,O>>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 Detail
-
produce
public <O> AsyncServerPipeline.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> AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,O>> 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.- Type Parameters:
O- response content representation.
-
asString
public AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,java.lang.String>> asString(ContentType contentType)
Configures the pipeline to represent the response message content as a String.
-
asByteArray
public AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,byte[]>> asByteArray(ContentType contentType)
Configures the pipeline to represent the response message content as byre array.
-
-