Package com.io7m.coffeepick.api

# Interface CoffeePickClientType

All Superinterfaces:
  `java.lang.AutoCloseable`, `java.io.Closeable`

    public interface CoffeePickClientType
    extends java.io.Closeable

The CoffeePick client API.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.util.concurrent.CompletableFuture<java.nio.file.Path>` | `catalogDownload​(java.lang.String id)` | Download the runtime with the given ID from the catalog, installing it into the inventory if the download succeeds and the data is correctly verified.
  `java.util.concurrent.CompletableFuture<java.nio.file.Path>` | `catalogDownloadIfNecessary​(java.lang.String id)` | Download the runtime with the given ID from the catalog, installing it into the inventory if the download succeeds and the data is correctly verified.
  `java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>>` | `catalogSearch​(CoffeePickSearch parameters)` | Search for runtimes matching the given parameters in the catalog.
  `default java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>>` | `catalogSearchAll()` | Search for all runtimes in the catalog.
  `default java.util.concurrent.CompletableFuture<java.util.Optional<RuntimeDescription>>` | `catalogSearchExact​(java.lang.String id)` | Search for a runtime with the given ID in the catalog.
  `io.reactivex.rxjava3.core.Observable<CoffeePickEventType>` | `events()` |
  `java.util.concurrent.CompletableFuture<java.lang.Void>` | `inventoryDelete​(java.lang.String id)` | Delete the runtime with the given ID from the inventory.
  `java.util.concurrent.CompletableFuture<java.util.Optional<java.nio.file.Path>>` | `inventoryPathOf​(java.lang.String id)` | Return the path of the archive of the runtime in the inventory, or nothing if the runtime isn't installed.
  `java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>>` | `inventorySearch​(CoffeePickSearch parameters)` | Search for runtimes matching the given parameters in the inventory.
  `default java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>>` | `inventorySearchAll()` | Search for all runtimes in the inventory.
  `java.util.concurrent.CompletableFuture<java.util.Optional<RuntimeDescription>>` | `inventorySearchExact​(java.lang.String id)` | Search for a runtime with the given ID in the inventory.
  `java.util.concurrent.CompletableFuture<java.nio.file.Path>` | `inventoryUnpack​(java.lang.String id, java.nio.file.Path path, java.util.Set<CoffeePickInventoryType.UnpackOption> options)` | Unpack the runtime with the given ID to the given path.
  `java.util.concurrent.CompletableFuture<CoffeePickVerification>` | `inventoryVerify​(java.lang.String id)` | Verify the runtime with the given ID in the inventory.
  `java.util.concurrent.CompletableFuture<java.lang.Void>` | `repositoryExport​(java.net.URI repository, FormatDescription format, FormatVersion version, java.nio.file.Path output_path)` | Export the repository with the given URI.
  `java.util.concurrent.CompletableFuture<java.lang.Void>` | `repositoryExport​(java.net.URI repository, FormatDescription format, java.nio.file.Path output_path)` | Export the repository with the given URI.
  `java.util.concurrent.CompletableFuture<java.lang.Void>` | `repositoryExport​(java.net.URI repository, java.net.URI format, java.nio.file.Path output_path)` | Export the repository with the given URI, using the default format.
  `java.util.concurrent.CompletableFuture<java.util.List<RuntimeRepositoryType>>` | `repositoryList()` | Retrieve a list of the available repositories.
  `java.util.concurrent.CompletableFuture<java.lang.Void>` | `repositoryUpdate​(java.net.URI uri)` | Update the repository with the given URI.

  ### Methods inherited from interface java.io.Closeable

  `close`

- ## Method Details

  - ### events

    io.reactivex.rxjava3.core.Observable<CoffeePickEventType> events()
    Returns:
      A stream of events published by the client

  - ### inventoryDelete

    java.util.concurrent.CompletableFuture<java.lang.Void> inventoryDelete​(java.lang.String id)
    Delete the runtime with the given ID from the inventory.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### inventoryVerify

    java.util.concurrent.CompletableFuture<CoffeePickVerification> inventoryVerify​(java.lang.String id)
    Verify the runtime with the given ID in the inventory.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### inventorySearch

    java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>> inventorySearch​(CoffeePickSearch parameters)
    Search for runtimes matching the given parameters in the inventory.
    Parameters:
      `parameters` - The search parameters
    Returns:
      The operation in progress

  - ### inventorySearchAll

    default java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>> inventorySearchAll()
    Search for all runtimes in the inventory.
    Returns:
      The operation in progress

  - ### inventorySearchExact

    java.util.concurrent.CompletableFuture<java.util.Optional<RuntimeDescription>> inventorySearchExact​(java.lang.String id)
    Search for a runtime with the given ID in the inventory.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### inventoryPathOf

    java.util.concurrent.CompletableFuture<java.util.Optional<java.nio.file.Path>> inventoryPathOf​(java.lang.String id)
    Return the path of the archive of the runtime in the inventory, or nothing if the runtime isn't installed.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### inventoryUnpack

    java.util.concurrent.CompletableFuture<java.nio.file.Path> inventoryUnpack​(java.lang.String id, java.nio.file.Path path, java.util.Set<CoffeePickInventoryType.UnpackOption> options)
    Unpack the runtime with the given ID to the given path.
    Parameters:
      `id` - The ID
      `path` - The target directory
      `options` - The unpacking options
    Returns:
      The operation in progress

  - ### catalogSearch

    java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>> catalogSearch​(CoffeePickSearch parameters)
    Search for runtimes matching the given parameters in the catalog.
    Parameters:
      `parameters` - The search parameters
    Returns:
      The operation in progress

  - ### catalogSearchAll

    default java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​RuntimeDescription>> catalogSearchAll()
    Search for all runtimes in the catalog.
    Returns:
      The operation in progress

  - ### catalogSearchExact

    default java.util.concurrent.CompletableFuture<java.util.Optional<RuntimeDescription>> catalogSearchExact​(java.lang.String id)
    Search for a runtime with the given ID in the catalog.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### catalogDownload

    java.util.concurrent.CompletableFuture<java.nio.file.Path> catalogDownload​(java.lang.String id)
    Download the runtime with the given ID from the catalog, installing it into the inventory if the download succeeds and the data is correctly verified.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### catalogDownloadIfNecessary

    java.util.concurrent.CompletableFuture<java.nio.file.Path> catalogDownloadIfNecessary​(java.lang.String id)
    Download the runtime with the given ID from the catalog, installing it into the inventory if the download succeeds and the data is correctly verified. If the runtime is already in the inventory, then skip the download.
    Parameters:
      `id` - The ID
    Returns:
      The operation in progress

  - ### repositoryUpdate

    java.util.concurrent.CompletableFuture<java.lang.Void> repositoryUpdate​(java.net.URI uri)
    Update the repository with the given URI.
    Parameters:
      `uri` - The URI
    Returns:
      The operation in progress

  - ### repositoryList

    java.util.concurrent.CompletableFuture<java.util.List<RuntimeRepositoryType>> repositoryList()
    Retrieve a list of the available repositories.
    Returns:
      The operation in progress

  - ### repositoryExport

    java.util.concurrent.CompletableFuture<java.lang.Void> repositoryExport​(java.net.URI repository, java.net.URI format, java.nio.file.Path output_path)
    Export the repository with the given URI, using the default format.
    Parameters:
      `repository` - The repository
      `format` - The format name
      `output_path` - The output file
    Returns:
      The operation in progress

  - ### repositoryExport

    java.util.concurrent.CompletableFuture<java.lang.Void> repositoryExport​(java.net.URI repository, FormatDescription format, FormatVersion version, java.nio.file.Path output_path)
    Export the repository with the given URI.
    Parameters:
      `repository` - The repository
      `output_path` - The output file
      `format` - The output format
      `version` - The output format version
    Returns:
      The operation in progress

  - ### repositoryExport

    java.util.concurrent.CompletableFuture<java.lang.Void> repositoryExport​(java.net.URI repository, FormatDescription format, java.nio.file.Path output_path)
    Export the repository with the given URI. The client will pick the highest supported format version.
    Parameters:
      `repository` - The repository
      `output_path` - The output file
      `format` - The output format
    Returns:
      The operation in progress