Package org.apache.hc.core5.http.nio
Interface AsyncDataProducer
- All Superinterfaces:
ResourceHolder
- All Known Subinterfaces:
AsyncClientExchangeHandler
,AsyncDataExchangeHandler
,AsyncEntityProducer
,AsyncPushProducer
,AsyncRequestProducer
,AsyncResponseProducer
,AsyncServerExchangeHandler
- All Known Implementing Classes:
AbstractBinAsyncEntityProducer
,AbstractCharAsyncEntityProducer
,AbstractClassicEntityProducer
,AbstractClassicServerExchangeHandler
,AbstractServerExchangeHandler
,AsyncEntityProducerWrapper
,BasicAsyncEntityProducer
,BasicAsyncServerExpectationDecorator
,BasicClientExchangeHandler
,BasicPushProducer
,BasicRequestProducer
,BasicResponseProducer
,BasicServerExchangeHandler
,DigestingEntityProducer
,FileEntityProducer
,ImmediateResponseExchangeHandler
,PathEntityProducer
,ReactiveDataProducer
,ReactiveEntityProducer
,ReactiveServerExchangeHandler
,StringAsyncEntityProducer
Abstract asynchronous data producer.
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of bytes immediately available for output.void
produce
(DataStreamChannel channel) Triggered to signal the ability of the underlying data channel to accept more data.Methods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder
releaseResources
-
Method Details
-
available
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:
- the number of bytes immediately available for output
-
produce
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
- the data channel capable to accepting more data.- Throws:
IOException
-