public interface AgentFileStreamService
Resource
so it can be, for example, returned by the server via web API.Modifier and Type | Interface and Description |
---|---|
static interface |
AgentFileStreamService.AgentFileResource
A
Resource for files local to a remote agent. |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<DirectoryManifest> |
getManifest(java.lang.String jobId)
Returns the manifest for a given job, boxed in an
Optional . |
java.util.Optional<AgentFileStreamService.AgentFileResource> |
getResource(@NotBlank java.lang.String jobId,
java.nio.file.Path relativePath,
java.net.URI uri)
Returns a Resource for the given job file boxed in an
Optional . |
java.util.Optional<AgentFileStreamService.AgentFileResource> getResource(@NotBlank @NotBlank java.lang.String jobId, java.nio.file.Path relativePath, java.net.URI uri)
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.jobId
- the job idrelativePath
- the relative path in the job directoryuri
- the file uri //TODO redundantResource
java.util.Optional<DirectoryManifest> getManifest(java.lang.String jobId)
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).jobId
- the job idDirectoryManifest