Package io.micronaut.http.netty.body
Interface NettyWriteContext
- All Known Subinterfaces:
OutboundAccess
- All Known Implementing Classes:
PipeliningServerHandler.OutboundAccessImpl
This interface is used to write the different kinds of netty responses.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.netty.buffer.ByteBufAllocator
alloc()
void
Write a response.default void
Write a full response.void
Write a full response.void
writeStreamed
(@NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull Publisher<io.netty.handler.codec.http.HttpContent> content) Write a streamed response.
-
Method Details
-
alloc
- Returns:
- The bytebuf allocator.
-
write
void write(@NonNull @NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull @NonNull ByteBody body) Write a response.- Parameters:
response
- The response status, headers etcbody
- The response body
-
writeFull
Write a full response.- Parameters:
response
- The response to write
-
writeFull
void writeFull(@NonNull @NonNull io.netty.handler.codec.http.FullHttpResponse response, boolean headResponse) Write a full response.- Parameters:
response
- The response to writeheadResponse
- Iftrue
, this is a response to aHEAD
request, so theContent-Length
header should not be overwritten.
-
writeStreamed
void writeStreamed(@NonNull @NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull @NonNull Publisher<io.netty.handler.codec.http.HttpContent> content) Write a streamed response.- Parameters:
response
- The response to writecontent
- The body
-