@Test(timeout = 100000) public void testRemoveAndForwardInbound() throws Exception { final BufferedTestHandler handler1 = new BufferedTestHandler(); final BufferedTestHandler handler2 = new BufferedTestHandler(); setUp(handler1, handler2); self.eventLoop().submit(new Runnable() { @Override public void run() { ChannelPipeline p = self.pipeline(); handler1.inboundBuffer.add(8); assertEquals(8, handler1.inboundBuffer.peek()); assertTrue(handler2.inboundBuffer.isEmpty()); p.remove(handler1); assertEquals(1, handler2.inboundBuffer.size()); assertEquals(8, handler2.inboundBuffer.peek()); } }).sync(); }
@Override public ChannelPipeline remove(ChannelHandler handler) { remove(getContextOrDie(handler)); return this; }
DefaultChannelPipeline implements ChannelPipeline { @Override public ChannelPipeline remove(ChannelHandler handler) { remove(getContextOrDie(handler)); return this; } }
DefaultChannelPipeline implements ChannelPipeline { @Override public ChannelPipeline remove(ChannelHandler handler) { remove(getContextOrDie(handler)); return this; } DefaultChannelPipeline(AbstractChannel channel); }
DefaultChannelPipeline implements ChannelPipeline { @Override public ChannelPipeline remove(ChannelHandler handler) { remove(getContextOrDie(handler)); return this; } DefaultChannelPipeline(AbstractChannel channel); @Override Channel channel(); @Override ChannelPipeline addFirst(String name, ChannelHandler handler); @Override ChannelPipeline addFirst(EventExecutorGroup group, final String name, ChannelHandler handler); @Override ChannelPipeline addLast(String name, ChannelHandler handler); @Override ChannelPipeline addLast(EventExecutorGroup group, final String name, ChannelHandler handler); @Override ChannelPipeline addBefore(String baseName, String name, ChannelHandler handler); @Override ChannelPipeline addBefore(
            EventExecutorGroup group, String baseName, final String name, ChannelHandler handler); @Override ChannelPipeline addAfter(String baseName, String name, ChannelHandler handler); @Override ChannelPipeline addAfter(
            EventExecutorGroup group, String baseName, final String name, ChannelHandler handler); @Override ChannelPipeline addFirst(ChannelHandler... handlers); @Override ChannelPipeline addFirst(EventExecutorGroup executor, ChannelHandler... handlers); @Override ChannelPipeline addLast(ChannelHandler... handlers); @Override ChannelPipeline addLast(EventExecutorGroup executor, ChannelHandler... handlers); @Override ChannelPipeline remove(ChannelHandler handler); @Override ChannelHandler remove(String name); @SuppressWarnings("unchecked") @Override T remove(Class<T> handlerType); @Override ChannelHandler removeFirst(); @Override ChannelHandler removeLast(); @Override ChannelPipeline replace(ChannelHandler oldHandler, String newName, ChannelHandler newHandler); @Override ChannelHandler replace(String oldName, String newName, ChannelHandler newHandler); @Override @SuppressWarnings("unchecked") T replace(
            Class<T> oldHandlerType, String newName, ChannelHandler newHandler); @Override ChannelHandler first(); @Override ChannelHandlerContext firstContext(); @Override ChannelHandler last(); @Override ChannelHandlerContext lastContext(); @Override ChannelHandler get(String name); @SuppressWarnings("unchecked") @Override T get(Class<T> handlerType); @Override ChannelHandlerContext context(String name); @Override ChannelHandlerContext context(ChannelHandler handler); @Override ChannelHandlerContext context(Class<? extends ChannelHandler> handlerType); @Override List<String> names(); @Override Map<String, ChannelHandler> toMap(); @Override Iterator<Map.Entry<String, ChannelHandler>> iterator(); @Override String toString(); @Override ChannelPipeline fireChannelRegistered(); @Override ChannelPipeline fireChannelUnregistered(); @Override ChannelPipeline fireChannelActive(); @Override ChannelPipeline fireChannelInactive(); @Override ChannelPipeline fireExceptionCaught(Throwable cause); @Override ChannelPipeline fireUserEventTriggered(Object event); @Override ChannelPipeline fireChannelRead(Object msg); @Override ChannelPipeline fireChannelReadComplete(); @Override ChannelPipeline fireChannelWritabilityChanged(); @Override ChannelFuture bind(SocketAddress localAddress); @Override ChannelFuture connect(SocketAddress remoteAddress); @Override ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress); @Override ChannelFuture disconnect(); @Override ChannelFuture close(); @Override ChannelFuture deregister(); @Override ChannelPipeline flush(); @Override ChannelFuture bind(SocketAddress localAddress, ChannelPromise promise); @Override ChannelFuture connect(SocketAddress remoteAddress, ChannelPromise promise); @Override ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise); @Override ChannelFuture disconnect(ChannelPromise promise); @Override ChannelFuture close(ChannelPromise promise); @Override ChannelFuture deregister(final ChannelPromise promise); @Override ChannelPipeline read(); @Override ChannelFuture write(Object msg); @Override ChannelFuture write(Object msg, ChannelPromise promise); @Override ChannelFuture writeAndFlush(Object msg, ChannelPromise promise); @Override ChannelFuture writeAndFlush(Object msg); }
DefaultChannelPipeline implements ChannelPipeline { @Override public ChannelPipeline remove(ChannelHandler handler) { remove(getContextOrDie(handler)); return this; } DefaultChannelPipeline(AbstractChannel channel); @Override Channel channel(); @Override ChannelPipeline addFirst(String name, ChannelHandler handler); @Override ChannelPipeline addFirst(EventExecutorGroup group, final String name, ChannelHandler handler); @Override ChannelPipeline addLast(String name, ChannelHandler handler); @Override ChannelPipeline addLast(EventExecutorGroup group, final String name, ChannelHandler handler); @Override ChannelPipeline addBefore(String baseName, String name, ChannelHandler handler); @Override ChannelPipeline addBefore(
            EventExecutorGroup group, String baseName, final String name, ChannelHandler handler); @Override ChannelPipeline addAfter(String baseName, String name, ChannelHandler handler); @Override ChannelPipeline addAfter(
            EventExecutorGroup group, String baseName, final String name, ChannelHandler handler); @Override ChannelPipeline addFirst(ChannelHandler... handlers); @Override ChannelPipeline addFirst(EventExecutorGroup executor, ChannelHandler... handlers); @Override ChannelPipeline addLast(ChannelHandler... handlers); @Override ChannelPipeline addLast(EventExecutorGroup executor, ChannelHandler... handlers); @Override ChannelPipeline remove(ChannelHandler handler); @Override ChannelHandler remove(String name); @SuppressWarnings("unchecked") @Override T remove(Class<T> handlerType); @Override ChannelHandler removeFirst(); @Override ChannelHandler removeLast(); @Override ChannelPipeline replace(ChannelHandler oldHandler, String newName, ChannelHandler newHandler); @Override ChannelHandler replace(String oldName, String newName, ChannelHandler newHandler); @Override @SuppressWarnings("unchecked") T replace(
            Class<T> oldHandlerType, String newName, ChannelHandler newHandler); @Override ChannelHandler first(); @Override ChannelHandlerContext firstContext(); @Override ChannelHandler last(); @Override ChannelHandlerContext lastContext(); @Override ChannelHandler get(String name); @SuppressWarnings("unchecked") @Override T get(Class<T> handlerType); @Override ChannelHandlerContext context(String name); @Override ChannelHandlerContext context(ChannelHandler handler); @Override ChannelHandlerContext context(Class<? extends ChannelHandler> handlerType); @Override List<String> names(); @Override Map<String, ChannelHandler> toMap(); @Override Iterator<Map.Entry<String, ChannelHandler>> iterator(); @Override String toString(); @Override ChannelPipeline fireChannelRegistered(); @Override ChannelPipeline fireChannelUnregistered(); @Override ChannelPipeline fireChannelActive(); @Override ChannelPipeline fireChannelInactive(); @Override ChannelPipeline fireExceptionCaught(Throwable cause); @Override ChannelPipeline fireUserEventTriggered(Object event); @Override ChannelPipeline fireChannelRead(Object msg); @Override ChannelPipeline fireChannelReadComplete(); @Override ChannelPipeline fireChannelWritabilityChanged(); @Override ChannelFuture bind(SocketAddress localAddress); @Override ChannelFuture connect(SocketAddress remoteAddress); @Override ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress); @Override ChannelFuture disconnect(); @Override ChannelFuture close(); @Override ChannelFuture deregister(); @Override ChannelPipeline flush(); @Override ChannelFuture bind(SocketAddress localAddress, ChannelPromise promise); @Override ChannelFuture connect(SocketAddress remoteAddress, ChannelPromise promise); @Override ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise); @Override ChannelFuture disconnect(ChannelPromise promise); @Override ChannelFuture close(ChannelPromise promise); @Override ChannelFuture deregister(final ChannelPromise promise); @Override ChannelPipeline read(); @Override ChannelFuture write(Object msg); @Override ChannelFuture write(Object msg, ChannelPromise promise); @Override ChannelFuture writeAndFlush(Object msg, ChannelPromise promise); @Override ChannelFuture writeAndFlush(Object msg);  }