}
private static class DummyProtocolCodecFactory implements ProtocolCodecFactory {
public ProtocolEncoder getEncoder(IoSession session) throws Exception {
return new ProtocolEncoderAdapter() {
public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {
logger.info("encode");
IoBuffer buffer = IoBuffer.allocate(4).putInt(123).flip();
out.write(buffer);
}