mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
27.28.2006 d1e5fe55252799742c6dc12265130edce17ff4be
opends/src/server/org/opends/server/core/Operation.java
@@ -152,7 +152,15 @@
    this.clientConnection = clientConnection;
    this.operationID      = operationID;
    this.messageID        = messageID;
    this.requestControls  = requestControls;
    if (requestControls == null)
    {
      this.requestControls = new ArrayList<Control>(0);
    }
    else
    {
      this.requestControls  = requestControls;
    }
    resultCode                 = ResultCode.UNDEFINED;
    additionalLogMessage       = new StringBuilder();
@@ -831,6 +839,39 @@
  /**
   * Indicates that this operation has been cancelled.  If appropriate, it will
   * send a response to the client to indicate that.  This method must not be
   * called by abandon, bind, or unbind operations under any circumstances, nor
   * by extended operations if the request OID is that of the cancel or the
   * StartTLS operation.
   *
   * @param  cancelRequest  The request to cancel this operation.
   */
  protected void indicateCancelled(CancelRequest cancelRequest)
  {
    assert debugEnter(CLASS_NAME, "indicateCancelled",
                      String.valueOf(cancelRequest));
    setCancelResult(CancelResult.CANCELED);
    if (cancelRequest.notifyOriginalRequestor() ||
        DirectoryServer.notifyAbandonedOperations())
    {
      setResultCode(ResultCode.CANCELED);
      String cancelReason = cancelRequest.getCancelReason();
      if (cancelReason != null)
      {
        appendErrorMessage(cancelReason);
      }
      clientConnection.sendResponse(this);
    }
  }
  /**
   * Retrieves a string representation of this operation.
   *
   * @return  A string representation of this operation.