Class JobDirectoryServerServiceImpl

java.lang.Object
com.netflix.genie.web.services.impl.JobDirectoryServerServiceImpl
All Implemented Interfaces:
JobDirectoryServerService

public class JobDirectoryServerServiceImpl extends Object implements JobDirectoryServerService
Default implementation of JobDirectoryServerService.
Since:
4.0.0
  • Constructor Details

    • 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 resources
      dataServices - The DataServices instance to use
      agentFileStreamService - The service providing file manifest for active agent jobs
      archivedJobService - The ArchivedJobService implementation to use to get archived job data
      meterRegistry - The meter registry used to keep track of metrics
      agentRoutingService - The agent routing service
  • Method Details

    • serveResource

      public void serveResource(String id, URL baseUrl, String relativePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws GenieException
      Given the 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.
      Specified by:
      serveResource in interface JobDirectoryServerService
      Parameters:
      id - The id of the job this request is for
      baseUrl - The base URL used to generate all URLs for resources
      relativePath - The relative path from the root of the job directory of the expected resource
      request - The HTTP request containing all information about the request
      response - The HTTP response where all results should be written
      Throws:
      GenieException - If there is an error serving the response