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 TypeMethodDescriptionvoidattachment(Object attachment) Set an attachment that is passed toRequestHandler.responseWritten(java.lang.Object).voidMark this channel to be closed after this response has been written.voidWrite a response.voidwriteHeadResponse(@NonNull io.netty.handler.codec.http.HttpResponse response) Write a response to aHEADrequest.
-
Method Details
-
attachment
Set an attachment that is passed toRequestHandler.responseWritten(java.lang.Object). Defaults tonull.- Specified by:
attachmentin 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:
closeAfterWritein interfaceOutboundAccess
-
writeHeadResponse
Description copied from interface:NettyWriteContextWrite a response to aHEADrequest. This is special because it never has a body but may still have a non-zeroContent-Lengthheader.- Specified by:
writeHeadResponsein 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:NettyWriteContextWrite a response.- Specified by:
writein interfaceNettyWriteContext- Parameters:
response- The response status, headers etcbody- The response body
-