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.
- Since:
- 4.0.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Give up on the response of this request, after writing it failed in a way that may have left a part of it on the connection, so that no other response can be written in its place: HTTP/1.1 closes the connection, HTTP/2 resets the stream.voidattachment(Object attachment) Set an attachment that is passed toRequestHandler.responseWritten(Object).voidMark this channel to be closed after this response has been written.voidWrite a response.voidwriteHeadResponse(io.netty.handler.codec.http.HttpResponse response) Write a response to aHEADrequest.
-
Method Details
-
attachment
Set an attachment that is passed toRequestHandler.responseWritten(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
-
abort
public void abort()Description copied from interface:OutboundAccessGive up on the response of this request, after writing it failed in a way that may have left a part of it on the connection, so that no other response can be written in its place: HTTP/1.1 closes the connection, HTTP/2 resets the stream. Does nothing if the response was written completely.- Specified by:
abortin interfaceOutboundAccess
-
writeHeadResponse
public void writeHeadResponse(io.netty.handler.codec.http.HttpResponse response) 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
Description copied from interface:NettyWriteContextWrite a response.- Specified by:
writein interfaceNettyWriteContext- Parameters:
response- The response status, headers etcbody- The response body
-