Class AsyncCommunityScanner

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    
    public final class AsyncCommunityScanner
     implements AutoCloseable
                        

    Async version of CommunityScanner that provides the communityScan method with polling functionality.

    This class extends the generated SDK to provide the same functionality as the old SDK's communityScan method, which initiates a scan and optionally waits for results.

    • Method Detail

      • communityScan

        @JvmOverloads() final CompletableFuture<ScanReport> communityScan(String modelName, String modelPath, String modelSource, String modelVersion, Boolean waitForResults, String requestSource, String origin)

        Convenience method with individual parameters (for backward compatibility).

        Parameters:
        modelName - Name of the model to be shown on the HiddenLayer UI
        modelPath - Path to the model file in the remote location, e.g.
        modelSource - Type of remote location where the model is stored
        modelVersion - Version of the model to be shown on the HiddenLayer UI (default: "main")
        waitForResults - Whether to wait for the scan to finish (default: true)
        requestSource - Source that requested the scan (default: "API Upload")
        origin - Origin platform where the model came from (default: "")
        Returns:

        A CompletableFuture containing the scan results

      • communityScan

        @JvmOverloads() final CompletableFuture<ScanReport> communityScan(String modelName, String modelPath, String modelSource, String modelVersion, Boolean waitForResults, String requestSource)

        Convenience method with individual parameters (for backward compatibility).

        Parameters:
        modelName - Name of the model to be shown on the HiddenLayer UI
        modelPath - Path to the model file in the remote location, e.g.
        modelSource - Type of remote location where the model is stored
        modelVersion - Version of the model to be shown on the HiddenLayer UI (default: "main")
        waitForResults - Whether to wait for the scan to finish (default: true)
        requestSource - Source that requested the scan (default: "API Upload")
        Returns:

        A CompletableFuture containing the scan results

      • communityScan

        @JvmOverloads() final CompletableFuture<ScanReport> communityScan(String modelName, String modelPath, String modelSource, String modelVersion, Boolean waitForResults)

        Convenience method with individual parameters (for backward compatibility).

        Parameters:
        modelName - Name of the model to be shown on the HiddenLayer UI
        modelPath - Path to the model file in the remote location, e.g.
        modelSource - Type of remote location where the model is stored
        modelVersion - Version of the model to be shown on the HiddenLayer UI (default: "main")
        waitForResults - Whether to wait for the scan to finish (default: true)
        Returns:

        A CompletableFuture containing the scan results

      • communityScan

        @JvmOverloads() final CompletableFuture<ScanReport> communityScan(String modelName, String modelPath, String modelSource, String modelVersion)

        Convenience method with individual parameters (for backward compatibility).

        Parameters:
        modelName - Name of the model to be shown on the HiddenLayer UI
        modelPath - Path to the model file in the remote location, e.g.
        modelSource - Type of remote location where the model is stored
        modelVersion - Version of the model to be shown on the HiddenLayer UI (default: "main")
        Returns:

        A CompletableFuture containing the scan results

      • communityScan

        @JvmOverloads() final CompletableFuture<ScanReport> communityScan(String modelName, String modelPath, String modelSource)

        Convenience method with individual parameters (for backward compatibility).

        Parameters:
        modelName - Name of the model to be shown on the HiddenLayer UI
        modelPath - Path to the model file in the remote location, e.g.
        modelSource - Type of remote location where the model is stored
        Returns:

        A CompletableFuture containing the scan results

      • close

         Unit close()

        Closes the AsyncCommunityScanner and shuts down the internal scheduled executor.

        This method implements AutoCloseable.close() and ensures that all threads in the internal executor are properly shut down.