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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
AResource
for files local to a remote agent. -
Method Summary
Modifier and TypeMethodDescriptiongetManifest
(String jobId) Returns the manifest for a given job, boxed in anOptional
.getResource
(@NotBlank String jobId, Path relativePath, URI uri, org.springframework.http.HttpRange range) Returns a Resource for the given job file boxed in anOptional
.
-
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 anOptional
. 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 toexist()
calls (if the file is not believed to exist on the agent) or false toisReadable()
if the file cannot be streamed for other reasons.- Parameters:
jobId
- the job idrelativePath
- the relative path in the job directoryuri
- the file uri //TODO redundantrange
- the list of ranges requested (RFC 7233) or null if no range is specified- Returns:
- an optional
Resource
-
getManifest
Returns the manifest for a given job, boxed in anOptional
. 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
-