Class PipeliningServerHandler.OutboundAccessImpl
java.lang.Object
io.micronaut.http.server.netty.handler.PipeliningServerHandler.OutboundAccessImpl
- All Implemented Interfaces:
NettyWriteContext
,OutboundAccess
- Enclosing class:
- PipeliningServerHandler
public final class PipeliningServerHandler.OutboundAccessImpl
extends Object
implements OutboundAccess
Class that allows writing the response for the request this object is associated with.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attachment
(Object attachment) Set an attachment that is passed toRequestHandler.responseWritten(java.lang.Object)
.void
Mark this channel to be closed after this response has been written.void
Write a response.void
writeHeadResponse
(@NonNull io.netty.handler.codec.http.HttpResponse response) Write a response to aHEAD
request.
-
Method Details
-
attachment
Set an attachment that is passed toRequestHandler.responseWritten(java.lang.Object)
. Defaults tonull
.- Specified by:
attachment
in interfaceOutboundAccess
- Parameters:
attachment
- The attachment to forward
-
closeAfterWrite
public void closeAfterWrite()Mark this channel to be closed after this response has been written.- Specified by:
closeAfterWrite
in interfaceOutboundAccess
-
writeHeadResponse
Description copied from interface:NettyWriteContext
Write a response to aHEAD
request. This is special because it never has a body but may still have a non-zeroContent-Length
header.- Specified by:
writeHeadResponse
in interfaceNettyWriteContext
- Parameters:
response
- The response status, headers etc
-
write
public void write(@NonNull @NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull @NonNull ByteBody body) Description copied from interface:NettyWriteContext
Write a response.- Specified by:
write
in interfaceNettyWriteContext
- Parameters:
response
- The response status, headers etcbody
- The response body
-