@Test public void testChainedCommand() throws Exception { IoHandlerChain chain = new IoHandlerChain(); StringBuilder buf = new StringBuilder(); chain.addLast("A", new TestCommand(buf, 'A')); chain.addLast("B", new TestCommand(buf, 'B')); chain.addLast("C", new TestCommand(buf, 'C')); new ChainedIoHandler(chain).messageReceived(new DummySession(), null); assertEquals("ABC", buf.toString()); }
@Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); }
ChainedIoHandler extends IoHandlerAdapter { @Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); } }
ChainedIoHandler extends IoHandlerAdapter { @Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); } ChainedIoHandler();  ChainedIoHandler(IoHandlerChain chain); }
ChainedIoHandler extends IoHandlerAdapter { @Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); } ChainedIoHandler();  ChainedIoHandler(IoHandlerChain chain); IoHandlerChain getChain(); @Override void messageReceived(IoSession session, Object message); }
ChainedIoHandler extends IoHandlerAdapter { @Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); } ChainedIoHandler();  ChainedIoHandler(IoHandlerChain chain); IoHandlerChain getChain(); @Override void messageReceived(IoSession session, Object message);  }