public interface AsyncDataProducer extends ResourceHolder
| Modifier and Type | Method and Description | 
|---|---|
| int | available()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. | 
releaseResourcesint available()
 Please note this method should return zero if the data producer
 is unable to produce any more data, in which case
 produce(DataStreamChannel) method will not get triggered.
 The producer can resume writing out data asynchronously
 once more data becomes available or request output readiness events
 with DataStreamChannel.requestOutput().
produce(DataStreamChannel), 
DataStreamChannel.requestOutput()void produce(DataStreamChannel channel) throws IOException
 Please note this method gets triggered only if available()
 returns a positive value.
channel - the data channel capable of accepting more data.IOException - in case of an I/O error.available()Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.