Package io.micronaut.http.server.netty
Class RoutingInBoundHandler
java.lang.Object
io.micronaut.http.server.netty.RoutingInBoundHandler
- All Implemented Interfaces:
- RequestHandler
@Internal
@Sharable
public final class RoutingInBoundHandler
extends Object
implements RequestHandler
Internal implementation of the 
ChannelInboundHandler for Micronaut.- Since:
- 1.0
- Author:
- Graeme Rocher
- 
Method SummaryModifier and TypeMethodDescriptionvoidaccept(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request, CloseableByteBody body, OutboundAccess outboundAccess) Handle a request.voidhandleUnboundError(Throwable cause) Handle an error that is not bound to a request, i.e.voidresponseWritten(Object attachment) Called roughly when a response has been written.voidwriteResponse(OutboundAccess outboundAccess, NettyHttpRequest<?> nettyHttpRequest, HttpResponse<?> response, Throwable throwable) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.server.netty.handler.RequestHandlerremoved
- 
Method Details- 
responseWrittenDescription copied from interface:RequestHandlerCalled roughly when a response has been written. In particular, it's called when the user is "done" with the response and has no way of adding further data. The bytes may not have been fully flushed yet, but e.g. the responsePublisherhas been fully consumed.
 This is used for cleaning up the request.- Specified by:
- responseWrittenin interface- RequestHandler
- Parameters:
- attachment- Object passed to- OutboundAccess.attachment(Object)
 
- 
handleUnboundErrorDescription copied from interface:RequestHandlerHandle an error that is not bound to a request, i.e. happens outside aStreamedHttpRequest.- Specified by:
- handleUnboundErrorin interface- RequestHandler
- Parameters:
- cause- The error
 
- 
acceptpublic void accept(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request, CloseableByteBody body, OutboundAccess outboundAccess) Description copied from interface:RequestHandlerHandle a request.- Specified by:
- acceptin interface- RequestHandler
- Parameters:
- ctx- The context this request came in on
- request- The request line and headers
- body- The request body
- outboundAccess- The- OutboundAccessto use for writing the response
 
- 
writeResponsepublic void writeResponse(OutboundAccess outboundAccess, NettyHttpRequest<?> nettyHttpRequest, HttpResponse<?> response, Throwable throwable) 
 
-