Class ScanUtilsKt

  • All Implemented Interfaces:

    
    public final class ScanUtilsKt
    
                        
    • Constructor Detail

    • Method Detail

      • getScanResults

         final static ScanReport getScanResults(HiddenLayerClient client, String scanId)

        Get scan results with retry logic for 404 errors.

        Used when waitForResults=false to handle initial scan availability.

        Parameters:
        client - The HiddenLayer client instance
        scanId - The ID of the scan to retrieve
        Returns:

        The scan report

      • waitForScanResults

         final static ScanReport waitForScanResults(HiddenLayerClient client, String scanId)

        Wait for scan results using exponential backoff polling.

        Handles initial 404 errors when scan is not immediately available.

        Parameters:
        client - The HiddenLayer client instance
        scanId - The ID of the scan to wait for
        Returns:

        The completed scan report

      • getScanResultsAsync

         final static CompletableFuture<ScanReport> getScanResultsAsync(HiddenLayerClientAsync client, String scanId, ScheduledExecutorService executor)

        Async version of getScanResults with retry logic for 404 errors.

        Used when waitForResults=false to handle initial scan availability.

        Parameters:
        client - The async HiddenLayer client instance
        scanId - The ID of the scan to retrieve
        executor - The executor to use for scheduling retries
        Returns:

        A CompletableFuture containing the scan report