public void stopCQAuthorize(String cqName, String queryString, Set regionNames)
      throws NotAuthorizedException {

    StopCQOperationContext stopCQContext =
        new StopCQOperationContext(cqName, queryString, regionNames);
    if (!authzCallback.authorizeOperation(null, stopCQContext)) {
      String errStr =
          String.format("Not authorized to perfom STOP_CQ operation [%s] on the cache",
              cqName);
      logger.warning(String.format("%s : %s", this, errStr));
      if (isPrincipalSerializable) {
        throw new NotAuthorizedException(errStr, principal);
      } else {
        throw new NotAuthorizedException(errStr);
      }
    } else {
      if (logger.finestEnabled()) {
        logger.finest(this + ": Authorized to perform STOP_CQ operation [" + cqName + ','
            + queryString + "] on cache");
      }
    }
  }
This class implements authorization calls for various operations. It provides methods to invoke
authorization callback ({@link AccessControl#authorizeOperation}) before the actual operation to
check for authorization (pre-processing) that may modify the arguments to the operations. The
data being passed for the operation is encapsulated in a {@link OperationContext} object that can
be modified by the pre-processing authorization callbacks.

@since GemFire 5.5
geode-core/src/main/java/org/apache/geode/internal/security/AuthorizeRequest.java