Class JobDirectoryServerServiceImpl

    • 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 the request this API will write the resource to response if possible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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 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 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