This commit is contained in:
Rossen Stoyanchev
2017-11-21 23:20:13 -05:00
parent d8099adc9a
commit b7c924cac1
5 changed files with 27 additions and 16 deletions

View File

@@ -116,10 +116,9 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
protected abstract T read() throws IOException;
/**
* Suspend reading. Defaults to no-op.
* Suspend reading, if the underlying API provides such a mechanism.
*/
protected void suspendReading() {
}
protected abstract void suspendReading();
// Private methods for use in State...

View File

@@ -266,6 +266,11 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
return null;
}
@Override
protected void suspendReading() {
// no-op
}
private class RequestBodyPublisherReadListener implements ReadListener {