private static interface InboundHttp2ToHttpAdapter.ImmediateSendDetector
Modifier and Type | Method and Description |
---|---|
FullHttpMessage |
copyIfNeeded(FullHttpMessage msg)
Determine if a copy must be made after an immediate send happens.
|
boolean |
mustSendImmediately(FullHttpMessage msg)
Determine if the response should be sent immediately, or wait for the end of the stream
|
boolean mustSendImmediately(FullHttpMessage msg)
msg
- The response to testtrue
if the message should be sent immediately
{@code false) if we should wait for the end of the streamFullHttpMessage copyIfNeeded(FullHttpMessage msg)
An example of this use case is if a request is received with a 'Expect: 100-continue' header. The message will be sent immediately, and the data will be queued and sent at the end of the stream.
msg
- The message which has just been sent due to mustSendImmediately(FullHttpMessage)
msg
or null
if a copy is not needed.