Package org.mockserver.responsewriter
Interface StreamErrorWriter
- All Known Implementing Classes:
Http3ResponseWriter
public interface StreamErrorWriter
Transport-neutral seam for resetting the request stream with an error code instead of returning a
response (an
HttpError carrying streamError).
HTTP/2 stream resets (RST_STREAM) are issued directly by
HttpErrorActionHandler on the Netty channel, because the
HTTP/2 frame/connection handlers are on the core classpath. HTTP/3 resets a QUIC stream
(RESET_STREAM) and the QUIC types live only in the netty module, so
HttpActionHandler delegates to this interface when the
active ResponseWriter implements it (the HTTP/3 response writer does). This keeps the
matching/dispatch logic in core transport-agnostic while the actual QUIC stream reset lives in the
netty module.
-
Method Summary
Modifier and TypeMethodDescriptionvoidwriteStreamError(long errorCode) Reset the current request stream with the given error code (HTTP/3 RESET_STREAM, RFC 9114 section 4.1 / section 8.1).
-
Method Details
-
writeStreamError
void writeStreamError(long errorCode) Reset the current request stream with the given error code (HTTP/3 RESET_STREAM, RFC 9114 section 4.1 / section 8.1).- Parameters:
errorCode- the application/stream error code to send on the reset
-