@Test public void shouldBeReadSuspendedWhenThreadAligned() { DummySessionEx session = new DummySessionEx(); session.setHandler(new IoHandlerAdapter() { @Override public void messageReceived(IoSession session, Object message) throws Exception { session.suspendRead(); } }); IoFilterChain filterChain = session.getFilterChain(); filterChain.fireMessageReceived(new Object()); assertTrue(session.isReadSuspended()); }
public void setHandler(IoHandler handler) { if (handler == null) { throw new NullPointerException("handler"); } this.handler = handler; }
DummySessionEx extends AbstractIoSessionEx { public void setHandler(IoHandler handler) { if (handler == null) { throw new NullPointerException("handler"); } this.handler = handler; } }
DummySessionEx extends AbstractIoSessionEx { public void setHandler(IoHandler handler) { if (handler == null) { throw new NullPointerException("handler"); } this.handler = handler; } DummySessionEx();  DummySessionEx(Thread thread, Executor executor);  DummySessionEx(Thread thread, Executor executor, IoProcessorEx<? extends IoSessionEx> processor); }
DummySessionEx extends AbstractIoSessionEx { public void setHandler(IoHandler handler) { if (handler == null) { throw new NullPointerException("handler"); } this.handler = handler; } DummySessionEx();  DummySessionEx(Thread thread, Executor executor);  DummySessionEx(Thread thread, Executor executor, IoProcessorEx<? extends IoSessionEx> processor); @Override IoBufferAllocatorEx<?> getBufferAllocator(); @Override IoSessionConfigEx getConfig(); void setConfig(IoSessionConfigEx config); @Override IoHandler getHandler(); void setHandler(IoHandler handler); @Override SocketAddress getLocalAddress(); @Override SocketAddress getRemoteAddress(); void setLocalAddress(SocketAddress localAddress); void setRemoteAddress(SocketAddress remoteAddress); @Override IoServiceEx getService(); void setService(IoServiceEx service); @Override final IoProcessorEx<? extends IoSessionEx> getProcessor(); @Override TransportMetadata getTransportMetadata(); void setTransportMetadata(TransportMetadata transportMetadata); @Override void setScheduledWriteBytes(int byteCount); void updateThroughput(boolean force); }
DummySessionEx extends AbstractIoSessionEx { public void setHandler(IoHandler handler) { if (handler == null) { throw new NullPointerException("handler"); } this.handler = handler; } DummySessionEx();  DummySessionEx(Thread thread, Executor executor);  DummySessionEx(Thread thread, Executor executor, IoProcessorEx<? extends IoSessionEx> processor); @Override IoBufferAllocatorEx<?> getBufferAllocator(); @Override IoSessionConfigEx getConfig(); void setConfig(IoSessionConfigEx config); @Override IoHandler getHandler(); void setHandler(IoHandler handler); @Override SocketAddress getLocalAddress(); @Override SocketAddress getRemoteAddress(); void setLocalAddress(SocketAddress localAddress); void setRemoteAddress(SocketAddress remoteAddress); @Override IoServiceEx getService(); void setService(IoServiceEx service); @Override final IoProcessorEx<? extends IoSessionEx> getProcessor(); @Override TransportMetadata getTransportMetadata(); void setTransportMetadata(TransportMetadata transportMetadata); @Override void setScheduledWriteBytes(int byteCount); void updateThroughput(boolean force);  }