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

public Interface AsyncDataProducer

extends ResourceHolder
Known Direct Subinterfaces
org.apache.hc.core5.http.nio.AsyncEntityProducer, org.apache.hc.core5.http.nio.AsyncPushProducer, org.apache.hc.core5.http.nio.AsyncRequestProducer, org.apache.hc.core5.http.nio.AsyncResponseProducer, org.apache.hc.core5.http.nio.AsyncDataExchangeHandler
Imports
java.io.IOException

Abstract asynchronous data producer.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of bytes immediately available for output
available
()

Returns the number of bytes immediately available for output.

public void
produce(DataStreamChannel
the data channel capable to accepting more data.
channel
)

Triggered to signal the ability of the underlying data channel to accept more data.

Inherited from org.apache.hc.core5.http.nio.ResourceHolder:
releaseResources

Method Detail

availableback to summary
public int available()

Returns the number of bytes immediately available for output. This method can be used as a hint to control output events of the underlying I/O session.

Returns:int

the number of bytes immediately available for output

produceback to summary
public void produce(DataStreamChannel channel) throws IOException

Triggered to signal the ability of the underlying data channel to accept more data. The data producer can choose to write data immediately inside the call or asynchronously at some later point.

Parameters
channel:DataStreamChannel

the data channel capable to accepting more data.