code: @Override
      public void doFilterWriteListeners(final long sessionId, final long sessionWrittenBytes, final WriteRequest writeRequest) {
          runManagementTask(new Runnable() {
              @Override
              public void run() {
                  try {
                      // The particular management listeners change on strategy, so get them here.
                      for (final GatewayManagementListener listener : getManagementListeners()) {
                          listener.doFilterWrite(GatewayManagementBeanImpl.this, sessionId);
                      }
  
                      markChanged();  // mark ourselves as changed, possibly tell listeners
                  } catch (Exception ex) {
                      logger.warn("Error during filterWrite gateway listener notifications:", ex);
                  }
              }
          });
      }
docs: Notify the management listeners on a filterWrite.
  <p/>
  NOTE: this starts on the IO thread, but runs a task OFF the thread.