Class JobDirectoryServerServiceImpl
- java.lang.Object
-
- com.netflix.genie.web.services.impl.JobDirectoryServerServiceImpl
-
- All Implemented Interfaces:
JobDirectoryServerService
public class JobDirectoryServerServiceImpl extends java.lang.Object implements JobDirectoryServerService
Default implementation ofJobDirectoryServerService
.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description JobDirectoryServerServiceImpl(org.springframework.core.io.ResourceLoader resourceLoader, DataServices dataServices, AgentFileStreamService agentFileStreamService, ArchivedJobService archivedJobService, io.micrometer.core.instrument.MeterRegistry meterRegistry, AgentRoutingService agentRoutingService)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
serveResource(java.lang.String id, java.net.URL baseUrl, java.lang.String relativePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Given therequest
this API will write the resource toresponse
if possible.
-
-
-
Constructor Detail
-
JobDirectoryServerServiceImpl
public JobDirectoryServerServiceImpl(org.springframework.core.io.ResourceLoader resourceLoader, DataServices dataServices, AgentFileStreamService agentFileStreamService, ArchivedJobService archivedJobService, io.micrometer.core.instrument.MeterRegistry meterRegistry, AgentRoutingService agentRoutingService)
Constructor.- Parameters:
resourceLoader
- The application resource loader used to get references to resourcesdataServices
- TheDataServices
instance to useagentFileStreamService
- The service providing file manifest for active agent jobsarchivedJobService
- TheArchivedJobService
implementation to use to get archived job datameterRegistry
- The meter registry used to keep track of metricsagentRoutingService
- The agent routing service
-
-
Method Detail
-
serveResource
public void serveResource(java.lang.String id, java.net.URL baseUrl, java.lang.String relativePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws GenieException
Given therequest
this API will write the resource toresponse
if possible. If the resource doesn't exist or an error is generated an appropriate HTTP error response will be written toresponse
instead.- Specified by:
serveResource
in interfaceJobDirectoryServerService
- Parameters:
id
- 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 written- Throws:
GenieException
- If there is an error serving the response
-
-