Interface DownloadApiFactory


  • @ProviderType
    public interface DownloadApiFactory

    Factory interface for creating various objects whose implementations depend on the type of service being implemented.

    Implementers of custom DownloadService implementations should implement this interface to return dependencies whose types are applicable to the custom service.

    See Also:
    DownloadService, DownloadManifest, DownloadFile, DownloadTarget
    • Method Detail

      • createDownloadManifest

        DownloadManifest createDownloadManifest()
        Creates a new manifest instance for use with the DownloadService.
        Returns:
        An empty manifest.
      • createDownloadFile

        DownloadFile createDownloadFile​(java.util.Optional<java.lang.Long> size,
                                        java.net.URI binaryURI,
                                        java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Creates a new instance for use with a DownloadTargetProcessor.
        Parameters:
        size - The size, in bytes, of the file.
        binaryURI - URI to the file's binary data.
        parameters - Additional data to include with the file.
        Returns:
        An initialized instance that uses the provided values.
      • createDownloadTarget

        DownloadTarget createDownloadTarget​(java.lang.String targetType,
                                            java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Creates a new instance for use with a DownloadManifest.
        Parameters:
        targetType - The target's DownloadTarget.getType() value.
        parameters - Parameters to be retrieved using the target's getParameter() methods.
        Returns:
        An initialized target instance that uses the provided values.