private static class UndertowServerHttpRequest.RequestBodyPublisher extends AbstractListenerReadPublisher<DataBuffer>
Modifier and Type | Field and Description |
---|---|
private DataBufferFactory |
bufferFactory |
private ByteBufferPool |
byteBufferPool |
private StreamSourceChannel |
channel |
logger
Constructor and Description |
---|
RequestBodyPublisher(HttpServerExchange exchange,
DataBufferFactory bufferFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkOnDataAvailable()
Check if data is available and either call
AbstractListenerReadPublisher.onDataAvailable()
immediately or schedule a notification. |
protected DataBuffer |
read()
Read once from the input, if possible.
|
protected void |
readingPaused()
Invoked when reading is paused due to a lack of demand.
|
private void |
registerListeners(HttpServerExchange exchange) |
onAllDataRead, onDataAvailable, onError, subscribe
private final StreamSourceChannel channel
private final DataBufferFactory bufferFactory
private final ByteBufferPool byteBufferPool
public RequestBodyPublisher(HttpServerExchange exchange, DataBufferFactory bufferFactory)
private void registerListeners(HttpServerExchange exchange)
protected void checkOnDataAvailable()
AbstractListenerReadPublisher
AbstractListenerReadPublisher.onDataAvailable()
immediately or schedule a notification.checkOnDataAvailable
in class AbstractListenerReadPublisher<DataBuffer>
protected void readingPaused()
AbstractListenerReadPublisher
Note: This method is guaranteed not to compete with
AbstractListenerReadPublisher.checkOnDataAvailable()
so it can be used to safely suspend
reading, if the underlying API supports it, i.e. without competing with
an implicit call to resume via checkOnDataAvailable()
.
readingPaused
in class AbstractListenerReadPublisher<DataBuffer>
@Nullable protected DataBuffer read() throws java.io.IOException
AbstractListenerReadPublisher
read
in class AbstractListenerReadPublisher<DataBuffer>
null
java.io.IOException