@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { addPassportState(ctx, PassportState.SERVER_CH_CLOSE); fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); super.close(ctx, promise); }
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (msg instanceof HttpRequest) { fireStartEvent(ctx, (HttpRequest) msg); } super.write(ctx, msg, promise); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { super.exceptionCaught(ctx, cause); fireCompleteEventIfNotAlready(ctx, CompleteReason.EXCEPTION); }
@Override public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { fireCompleteEventIfNotAlready(ctx, CompleteReason.DISCONNECT); super.disconnect(ctx, promise); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { fireCompleteEventIfNotAlready(ctx, CompleteReason.INACTIVE); super.channelInactive(ctx); }
@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { addPassportState(ctx, PassportState.SERVER_CH_CLOSE); fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); super.close(ctx, promise); }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpRequest) { // Fire start event, and if that succeeded, then allow processing to // continue to next handler in pipeline. if (fireStartEvent(ctx, (HttpRequest) msg)) { super.channelRead(ctx, msg); } } else { super.channelRead(ctx, msg); } }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { try { super.channelInactive(ctx); } finally { fireCompleteEventIfNotAlready(ctx, CompleteReason.INACTIVE); } }
@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { addPassportState(ctx, PassportState.SERVER_CH_CLOSE); fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); super.close(ctx, promise); }
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (msg instanceof HttpRequest) { fireStartEvent(ctx, (HttpRequest) msg); } super.write(ctx, msg, promise); }
@Override public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { fireCompleteEventIfNotAlready(ctx, CompleteReason.DISCONNECT); super.disconnect(ctx, promise); }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpRequest) { // Fire start event, and if that succeeded, then allow processing to // continue to next handler in pipeline. if (fireStartEvent(ctx, (HttpRequest) msg)) { super.channelRead(ctx, msg); } } else { super.channelRead(ctx, msg); } }
@Override public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { fireCompleteEventIfNotAlready(ctx, CompleteReason.DEREGISTER); super.deregister(ctx, promise); }
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (msg instanceof HttpRequest) { fireStartEvent(ctx, (HttpRequest) msg); } super.write(ctx, msg, promise); }
@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); super.close(ctx, promise); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpRequest) { // Fire start event, and if that succeeded, then allow processing to // continue to next handler in pipeline. if (fireStartEvent(ctx, (HttpRequest) msg)) { super.channelRead(ctx, msg); } } else { super.channelRead(ctx, msg); } }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpResponse) { ctx.channel().attr(ATTR_HTTP_RESP).set((HttpResponse) msg); } try { super.channelRead(ctx, msg); } finally { if (msg instanceof LastHttpContent) { fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE); } } }
fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE); } else { promise.addListener(future -> { fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE); });
@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); super.close(ctx, promise); } }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { try { super.channelInactive(ctx); } finally { fireCompleteEventIfNotAlready(ctx, CompleteReason.INACTIVE); } }