Interface AgentFileStreamService

All Known Implementing Classes:
GRpcAgentFileStreamServiceImpl

public interface AgentFileStreamService
Service to retrieve files from a remote agent while the latter is executing a job. The file is returned as a Resource so it can be, for example, returned by the server via web API.
Since:
4.0.0
  • Method Details

    • getResource

      Optional<AgentFileStreamService.AgentFileResource> getResource(@NotBlank @NotBlank String jobId, Path relativePath, URI uri, @Nullable org.springframework.http.HttpRange range)
      Returns a Resource for the given job file boxed in an Optional. If the service is unable to determine whether the file exists, the optional is empty. In all other cases, the optional is not empty. However the resource may return false to exist() calls (if the file is not believed to exist on the agent) or false to isReadable() if the file cannot be streamed for other reasons.
      Parameters:
      jobId - the job id
      relativePath - the relative path in the job directory
      uri - the file uri //TODO redundant
      range - the list of ranges requested (RFC 7233) or null if no range is specified
      Returns:
      an optional Resource
    • getManifest

      Optional<DirectoryManifest> getManifest(String jobId)
      Returns the manifest for a given job, boxed in an Optional. The manifest may not be present if the agent is not connected to this node (for example because execution has completed, or because the agent is connected to a different node).
      Parameters:
      jobId - the job id
      Returns:
      an optional DirectoryManifest