private class ServletServerHttpRequest.RequestBodyPublisher extends AbstractListenerReadPublisher<DataBuffer>
Modifier and Type | Class and Description |
---|---|
private class |
ServletServerHttpRequest.RequestBodyPublisher.RequestBodyPublisherReadListener |
Modifier and Type | Field and Description |
---|---|
private ServletInputStream |
inputStream |
rsReadLogger
Constructor and Description |
---|
RequestBodyPublisher(ServletInputStream inputStream) |
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 void |
discardData()
Invoked after an I/O read error from the underlying server or after a
cancellation signal from the downstream consumer to allow sub-classes
to discard any current cached data they might have.
|
protected DataBuffer |
read()
Read once from the input, if possible.
|
protected void |
readingPaused()
Invoked when reading is paused due to a lack of demand.
|
void |
registerReadListener() |
getLogPrefix, onAllDataRead, onDataAvailable, onError, subscribe
public void registerReadListener() throws java.io.IOException
java.io.IOException
protected void checkOnDataAvailable()
AbstractListenerReadPublisher
AbstractListenerReadPublisher.onDataAvailable()
immediately or schedule a notification.checkOnDataAvailable
in class AbstractListenerReadPublisher<DataBuffer>
@Nullable protected DataBuffer read() throws java.io.IOException
AbstractListenerReadPublisher
read
in class AbstractListenerReadPublisher<DataBuffer>
null
java.io.IOException
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>
protected void discardData()
AbstractListenerReadPublisher
discardData
in class AbstractListenerReadPublisher<DataBuffer>