Пример #1
0
  /**
   * Dispose the decoder, removing its instance from the session's attributes, and calling the
   * associated dispose method.
   */
  private void disposeDecoder(IoSession session) {
    ProtocolDecoder decoder = (ProtocolDecoder) session.removeAttribute(DECODER);
    if (decoder == null) {
      return;
    }

    try {
      decoder.dispose(session);
    } catch (Throwable t) {
      LOGGER.warn("Failed to dispose: " + decoder.getClass().getName() + " (" + decoder + ')');
    }
  }