Top Description Methods
org.apache.hc.core5.http.nio

public Interface ResponseChannel

Annotations
@Contract
threading:SAFE
Imports
java.io.IOException, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpRequest, .HttpResponse, org.apache.hc.core5.http.protocol.HttpContext

Abstract response / response promise channel.

Implementations are expected to be thread-safe.

Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
pushPromise(HttpRequest
the request message header used as a promise.
promise
,
AsyncPushProducer
the push response message producer.
responseProducer
,
HttpContext
the actual execution context.
context
)

Pushes a request message head through this channel as a promise to deliver a response message.

public void
sendInformation(HttpResponse
an intermediate (1xx) HTTP response.
response
,
HttpContext
the actual execution context.
context
)

Sends an intermediate informational HTTP response through this channel.

public void
sendResponse(HttpResponse
a final (non 1xx) HTTP response
response
,
EntityDetails
the response entity details or null if the response does not enclose an entity.
entityDetails
,
HttpContext
the actual execution context.
context
)

Sends a final HTTP response through this channel.

Method Detail

pushPromiseback to summary
public void pushPromise(HttpRequest promise, AsyncPushProducer responseProducer, HttpContext context) throws HttpException, IOException

Pushes a request message head through this channel as a promise to deliver a response message.

Parameters
promise:HttpRequest

the request message header used as a promise.

responseProducer:AsyncPushProducer

the push response message producer.

context:HttpContext

the actual execution context.

sendInformationback to summary
public void sendInformation(HttpResponse response, HttpContext context) throws HttpException, IOException

Sends an intermediate informational HTTP response through this channel.

Parameters
response:HttpResponse

an intermediate (1xx) HTTP response.

context:HttpContext

the actual execution context.

sendResponseback to summary
public void sendResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context) throws HttpException, IOException

Sends a final HTTP response through this channel.

Parameters
response:HttpResponse

a final (non 1xx) HTTP response

entityDetails:EntityDetails

the response entity details or null if the response does not enclose an entity.

context:HttpContext

the actual execution context.