code: public DecodingState finishDecode(ProtocolDecoderOutput out)
              throws Exception {
          DecodingState nextState;
          DecodingState state = getCurrentState();
          try {
              for (;;) {
                  DecodingState oldState = state;
                  state = state.finishDecode(childOutput);
                  if (state == null) {
                      // Finished
                      break;
                  }
      
                  // Exit if state didn't change.
                  if (oldState == state) {
                      break;
                  }
              }
          } catch (Exception e) {
              state = null;
              log.debug(
                      "Ignoring the exception caused by a closed session.", e);
          } finally {
              this.currentState = state;
              nextState = finishDecode(childProducts, out);
              if (state == null) {
                  cleanup();
              }
          }
          return nextState;
      }
docs: {@inheritDoc}