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.
-
-
Constructor Summary
Constructors Constructor Description AsyncCommunityScanner(HiddenLayerClientAsync client)
-
Method Summary
Modifier and Type Method Description final CompletableFuture<ScanReport>communityScan(CommunityScanOptions options)Async version of communityScan. 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). final CompletableFuture<ScanReport>communityScan(String modelName, String modelPath, String modelSource, String modelVersion, Boolean waitForResults, String requestSource)Convenience method with individual parameters (for backward compatibility). final CompletableFuture<ScanReport>communityScan(String modelName, String modelPath, String modelSource, String modelVersion, Boolean waitForResults)Convenience method with individual parameters (for backward compatibility). final CompletableFuture<ScanReport>communityScan(String modelName, String modelPath, String modelSource, String modelVersion)Convenience method with individual parameters (for backward compatibility). final CompletableFuture<ScanReport>communityScan(String modelName, String modelPath, String modelSource)Convenience method with individual parameters (for backward compatibility). Unitclose()Closes the AsyncCommunityScanner and shuts down the internal scheduled executor. -
-
Constructor Detail
-
AsyncCommunityScanner
AsyncCommunityScanner(HiddenLayerClientAsync client)
-
-
Method Detail
-
communityScan
final CompletableFuture<ScanReport> communityScan(CommunityScanOptions options)
Async version of communityScan.
- Parameters:
options- The scan options containing model information- 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, String origin)
Convenience method with individual parameters (for backward compatibility).
- Parameters:
modelName- Name of the model to be shown on the HiddenLayer UImodelPath- Path to the model file in the remote location, e.g.modelSource- Type of remote location where the model is storedmodelVersion- 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 UImodelPath- Path to the model file in the remote location, e.g.modelSource- Type of remote location where the model is storedmodelVersion- 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 UImodelPath- Path to the model file in the remote location, e.g.modelSource- Type of remote location where the model is storedmodelVersion- 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 UImodelPath- Path to the model file in the remote location, e.g.modelSource- Type of remote location where the model is storedmodelVersion- 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 UImodelPath- 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
-
-
-
-