@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { HttpProcessingState state = getStateAndCreateIfNeeded(ctx, cause); finalizeChannelPipeline(ctx, null, state, cause); return PipelineContinuationBehavior.DO_NOT_FIRE_CONTINUE_EVENT; }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) throws Exception { sendResponse(ctx, msg); return PipelineContinuationBehavior.CONTINUE; }
@Override protected boolean argsAreEligibleForLinkingAndUnlinkingDistributedTracingInfo( HandlerMethodToExecute methodToExecute, ChannelHandlerContext ctx, Object msgOrEvt, Throwable cause ) { return shouldHandleDoChannelReadMessage(msgOrEvt) || (methodToExecute == DO_EXCEPTION_CAUGHT); } }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) { if (shouldHandleDoChannelReadMessage(msg)) { executeResponseFilters(ctx); } return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) { if (shouldHandleDoChannelReadMessage(msg)) endDtrace(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) { endDtrace(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // Exceptions should always execute filters. executeResponseFilters(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof LastOutboundMessage) { doAccessLogging(ctx); } return PipelineContinuationBehavior.CONTINUE; }
@Override protected boolean argsAreEligibleForLinkingAndUnlinkingDistributedTracingInfo( HandlerMethodToExecute methodToExecute, ChannelHandlerContext ctx, Object msgOrEvt, Throwable cause ) { return shouldHandleDoChannelReadMessage(msgOrEvt); }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { HttpProcessingState state = getStateAndCreateIfNeeded(ctx, cause); finalizeChannelPipeline(ctx, null, state, cause); return PipelineContinuationBehavior.DO_NOT_FIRE_CONTINUE_EVENT; }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) { if (shouldHandleDoChannelReadMessage(msg)) { executeResponseFilters(ctx); } return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) { if (shouldHandleDoChannelReadMessage(msg)) endDtrace(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { sendResponse(ctx, null); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) { endDtrace(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // Exceptions should always execute filters. executeResponseFilters(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doExceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { // TODO: Catch the case where the response was started earlier, and then this exception was thrown before the // response was fully sent. This indicates a broken response (an extremely rare case) and we don't want to // do a normal access log for it. What should we do? Or should the detection be in AccessLogger itself? If // so, what should it do? doAccessLogging(ctx); return PipelineContinuationBehavior.CONTINUE; }
@Override protected boolean argsAreEligibleForLinkingAndUnlinkingDistributedTracingInfo( HandlerMethodToExecute methodToExecute, ChannelHandlerContext ctx, Object msgOrEvt, Throwable cause ) { return shouldHandleDoChannelReadMessage(msgOrEvt) || (methodToExecute == DO_EXCEPTION_CAUGHT); } }
@Override protected boolean argsAreEligibleForLinkingAndUnlinkingDistributedTracingInfo( HandlerMethodToExecute methodToExecute, ChannelHandlerContext ctx, Object msgOrEvt, Throwable cause ) { return shouldHandleDoChannelReadMessage(msgOrEvt); }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) throws Exception { sendResponse(ctx, msg); return PipelineContinuationBehavior.CONTINUE; }
@Override public PipelineContinuationBehavior doChannelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof LastOutboundMessage) { doAccessLogging(ctx); } return PipelineContinuationBehavior.CONTINUE; }