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

public Interface AsyncRequestProducer

extends AsyncDataProducer
Known Direct Implementers
org.apache.hc.core5.http.nio.support.BasicRequestProducer
Imports
java.io.IOException, org.apache.hc.core5.http.HttpException, org.apache.hc.core5.http.protocol.HttpContext

Abstract asynchronous request producer.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
failed(Exception
the cause of the failure.
cause
)

Triggered to signal a failure in data generation.

public boolean
isRepeatable()

Determines whether the producer can consistently produce the same content after invocation of ResourceHolder#releaseResources().

public void
sendRequest(RequestChannel
the request channel capable to accepting a request message.
channel
,
HttpContext
the actual execution context.
context
)

Triggered to signal the ability of the underlying request channel to accept a request messages.

Inherited from org.apache.hc.core5.http.nio.AsyncDataProducer:
availableproduce

Method Detail

failedback to summary
public void failed(Exception cause)

Triggered to signal a failure in data generation.

Parameters
cause:Exception

the cause of the failure.

isRepeatableback to summary
public boolean isRepeatable()

Determines whether the producer can consistently produce the same content after invocation of ResourceHolder#releaseResources().

sendRequestback to summary
public void sendRequest(RequestChannel channel, HttpContext context) throws HttpException, IOException

Triggered to signal the ability of the underlying request channel to accept a request messages. The data producer can choose to send a request message immediately inside the call or asynchronously at some later point.

Parameters
channel:RequestChannel

the request channel capable to accepting a request message.

context:HttpContext

the actual execution context.