code: @Override
      public void doMessageReceived(final long sessionId, final long sessionReadBytes, final Object message) throws Exception {
          if (message instanceof ByteBuffer) {
              ThreadGatewayStats stats = gatewayStats.get();
              stats.doMessageReceived((IoBuffer) message);
          }
      }
docs: This must run ON the IO thread