private Callback<Void> securityPostProcessRequestCallback() {
      return buildCallback(frontendMetrics.getDatasetsSecurityPostProcessRequestMetrics, securityCheckResult -> {
        byte[] serialized;
        LOGGER.debug("Received request for getting single dataset with arguments: {}", restRequest.getArgs());
        Dataset dataset = getDataset();
        serialized = AccountCollectionSerde.serializeDatasetsInJson(dataset);
        restResponseChannel.setHeader(RestUtils.Headers.TARGET_ACCOUNT_NAME, dataset.getAccountName());
        restResponseChannel.setHeader(RestUtils.Headers.TARGET_CONTAINER_NAME, dataset.getContainerName());
        ReadableStreamChannel channel = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(serialized));
        restResponseChannel.setHeader(RestUtils.Headers.DATE, new GregorianCalendar().getTime());
        restResponseChannel.setHeader(RestUtils.Headers.CONTENT_TYPE, RestUtils.JSON_CONTENT_TYPE);
        restResponseChannel.setHeader(RestUtils.Headers.CONTENT_LENGTH, channel.getSize());
        finalCallback.onCompletion(channel, null);
      }, uri, LOGGER, finalCallback);
    }
After {@link SecurityService#postProcessRequest} finishes, call getDataset to get the {@link Dataset}.
@return a {@link Callback} to be used with {@link SecurityService#postProcessRequest}.
ambry-frontend/src/main/java/com/github/ambry/frontend/GetDatasetsHandler.java