public class JobDirectoryServerServiceImpl extends java.lang.Object implements JobDirectoryServerService
JobDirectoryServerService
.Constructor and Description |
---|
JobDirectoryServerServiceImpl(org.springframework.core.io.ResourceLoader resourceLoader,
JobPersistenceService jobPersistenceService,
JobFileService jobFileService,
AgentFileStreamService agentFileStreamService,
io.micrometer.core.instrument.MeterRegistry meterRegistry,
JobDirectoryManifestService jobDirectoryManifestService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
serveResource(java.lang.String jobId,
java.net.URL baseUrl,
java.lang.String relativePath,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Given the
request this API will write the resource to response if possible. |
public JobDirectoryServerServiceImpl(org.springframework.core.io.ResourceLoader resourceLoader, JobPersistenceService jobPersistenceService, JobFileService jobFileService, AgentFileStreamService agentFileStreamService, io.micrometer.core.instrument.MeterRegistry meterRegistry, JobDirectoryManifestService jobDirectoryManifestService)
resourceLoader
- The application resource loader used to get references to resourcesjobPersistenceService
- The job persistence service used to get information about a jobjobFileService
- The service responsible for managing the job directory for V3 JobsagentFileStreamService
- The service providing file manifest for active agent jobsmeterRegistry
- The meter registry used to keep track of metricsjobDirectoryManifestService
- The job directory manifest servicepublic void serveResource(java.lang.String jobId, java.net.URL baseUrl, java.lang.String relativePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
request
this API will write the resource to response
if possible. If the resource
doesn't exist or an error is generated an appropriate HTTP error response will be written to response
instead.serveResource
in interface JobDirectoryServerService
jobId
- The id of the job this request is forbaseUrl
- The base URL used to generate all URLs for resourcesrelativePath
- The relative path from the root of the job directory of the expected resourcerequest
- The HTTP request containing all information about the requestresponse
- The HTTP response where all results should be writtenjava.io.IOException
- If there is an error interacting with the responsejavax.servlet.ServletException
- If there is an error interacting with the Java Servlet objects