private void remove0() { if (!removed) { removed = true; try { handler.handlerRemoved(this); } catch (Throwable cause) { fireExceptionCaught(new ChannelPipelineException( handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause)); } } } }
private void remove0() { if (!removed) { removed = true; try { handler.handlerRemoved(this); } catch (Throwable cause) { fireExceptionCaught(new ChannelPipelineException( handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause)); } } } }
final void callHandlerRemoved() throws Exception { try { // Only call handlerRemoved(...) if we called handlerAdded(...) before. if (handlerState == ADD_COMPLETE) { handler().handlerRemoved(this); } } finally { // Mark the handler as removed in any case. setRemoved(); } }
final void callHandlerRemoved() throws Exception { try { // Only call handlerRemoved(...) if we called handlerAdded(...) before. if (handlerState == ADD_COMPLETE) { handler().handlerRemoved(this); } } finally { // Mark the handler as removed in any case. setRemoved(); } }
private void remove0() { if (!removed) { removed = true; try { handler.handlerRemoved(this); } catch (Throwable cause) { fireExceptionCaught(new ChannelPipelineException( handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause)); } } } }
private void callHandlerRemoved0(final AbstractChannelHandlerContext ctx) { // Notify the complete removal. try { try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved(); } } catch (Throwable t) { fireExceptionCaught(new ChannelPipelineException( ctx.handler().getClass().getName() + ".handlerRemoved() has thrown an exception.", t)); } }
remove0(ctx); try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved();
.afterChannelInitialized(any(SocketChannel.class)); verify(handler, times(expectedNumberOfCalls)).handlerAdded(any(ChannelHandlerContext.class)); verify(handler, times(expectedNumberOfCalls)).handlerRemoved(any(ChannelHandlerContext.class)); verify(nettyOptions, times(1)).onClusterClose(eventLoopGroup); verify(nettyOptions, times(1)).onClusterClose(timer);
private static void disableHandler(ChannelHandler timeoutHandler, ChannelHandlerContext handlerContext) { try { timeoutHandler.handlerRemoved(handlerContext); } catch (Exception e) { logger.error("Failed to remove readtimeout handler. This connection will be discarded.", e); handlerContext.channel().attr(ClientRequestResponseConverter.DISCARD_CONNECTION).set(true); } }
private void remove0() { if (!removed) { removed = true; try { handler.handlerRemoved(this); } catch (Throwable cause) { fireExceptionCaught(new ChannelPipelineException( handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause)); } } } }
private void remove0() { if (!removed) { removed = true; try { handler.handlerRemoved(this); } catch (Throwable cause) { fireExceptionCaught(new ChannelPipelineException( handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause)); } } } }
private void remove0() { if (!removed) { removed = true; try { handler.handlerRemoved(this); } catch (Throwable cause) { fireExceptionCaught(new ChannelPipelineException( handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause)); } } } }
private void callHandlerRemoved0(final AbstractChannelHandlerContext ctx) { // Notify the complete removal. try { try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved(); } } catch (Throwable t) { fireExceptionCaught(new ChannelPipelineException( ctx.handler().getClass().getName() + ".handlerRemoved() has thrown an exception.", t)); } }
private void callHandlerRemoved0(final AbstractChannelHandlerContext ctx) { // Notify the complete removal. try { try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved(); } } catch (Throwable t) { fireExceptionCaught(new ChannelPipelineException( ctx.handler().getClass().getName() + ".handlerRemoved() has thrown an exception.", t)); } }
private void callHandlerRemoved0(final AbstractChannelHandlerContext ctx) { // Notify the complete removal. try { try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved(); } } catch (Throwable t) { fireExceptionCaught(new ChannelPipelineException( ctx.handler().getClass().getName() + ".handlerRemoved() has thrown an exception.", t)); } }
ctx.pipeline().remove(READ_TIMEOUT_HANDLER).handlerRemoved(ctx); } catch (ClassCastException e) { log.warn("channelRead: Non-handshake message received by handshake handler." +
remove0(ctx); try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved();
remove0(ctx); try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved();
remove0(ctx); try { ctx.handler().handlerRemoved(ctx); } finally { ctx.setRemoved();
.afterChannelInitialized(any(SocketChannel.class)); verify(handler, times(expectedNumberOfCalls)).handlerAdded(any(ChannelHandlerContext.class)); verify(handler, times(expectedNumberOfCalls)).handlerRemoved(any(ChannelHandlerContext.class)); verify(nettyOptions, times(1)).onClusterClose(eventLoopGroup); verify(nettyOptions, times(1)).onClusterClose(timer);