# Class CSLLDownloader

java.lang.Object
com.io7m.certusine.looseleaf.CSLLDownloader

public final class CSLLDownloader extends Object
A downloader that can take certificates from a looseleaf database and save it to a local directory.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CSCertificateName`
  `certificateName()`
  `static CSLLDownloader`
  `create(com.io7m.looseleaf.protocol.v1.LLv1Messages messages, HttpClient client, Path directory, String baseURI, CSLLCredentials credentials, String domain, CSCertificateName certificateName)`
  Create a new downloader.
  `static CSLLDownloader`
  `create(Path directory, String baseURI, CSLLCredentials credentials, String domain, CSCertificateName certificateName)`
  Create a new downloader.
  `void`
  `execute()`
  Execute the downloader once.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### certificateName

    public CSCertificateName certificateName()
    Returns:
      The certificate name

  - ### create

    public static CSLLDownloader create(Path directory, String baseURI, CSLLCredentials credentials, String domain, CSCertificateName certificateName)
    Create a new downloader.
    Parameters:
      `directory` - The output directory
      `baseURI` - The base URI for the API
      `credentials` - The credentials
      `domain` - The domain
      `certificateName` - The certificate name
    Returns:
      A new downloader

  - ### create

    public static CSLLDownloader create(com.io7m.looseleaf.protocol.v1.LLv1Messages messages, HttpClient client, Path directory, String baseURI, CSLLCredentials credentials, String domain, CSCertificateName certificateName)
    Create a new downloader.
    Parameters:
      `messages` - The V1 message deserializer
      `client` - The client
      `directory` - The output directory
      `baseURI` - The base URI for the API
      `credentials` - The credentials
      `domain` - The domain
      `certificateName` - The certificate name
    Returns:
      A new downloader

  - ### execute

    public void execute() throws IOException, InterruptedException
    Execute the downloader once. May be called multiple times.
    Throws:
      `IOException` - On I/O errors
      `InterruptedException` - On interruptions