private Callback<Void> securityProcessResponseCallback(GetBlobResult result) {
      return buildCallback(metrics.getBlobSecurityProcessResponseMetrics, securityCheckResult -> {
            ReadableStreamChannel response = result.getBlobDataChannel();
            if (subResource == null) {
              response = closeChannelIfNotModified(result);
            } else {
              switch (subResource) {
                case BlobInfo:
                case UserMetadata:
                  response = setMetadataInResponseChannel(result);
                  break;
                case Segment:
                  response = closeChannelIfNotModified(result);
                  break;
                case BlobChunkIds:
                  response = setChunkBlobIdsInResponseChannel(result);
                  break;
                default:
                  LOGGER.error("Unexpected subResource {} when handle response", subResource);
              }
            }
            finalCallback.onCompletion(response, null);
          }, restRequest.getUri(), LOGGER,
          // Still pass result.getBlobDataChannel() to finalCallback since we already have it.
          (r, e) -> finalCallback.onCompletion(result != null ? result.getBlobDataChannel() : null, e));
    }
After {@link SecurityService#processResponse}, call {@code finalCallback}.
@return a {@link Callback} to be used with {@link SecurityService#processResponse}.
ambry-frontend/src/main/java/com/github/ambry/frontend/GetBlobHandler.java