Package org.apache.storm.daemon.logviewer.handler

# Class LogviewerLogDownloadHandler

java.lang.Object
org.apache.storm.daemon.logviewer.handler.LogviewerLogDownloadHandler

public class LogviewerLogDownloadHandler extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LogviewerLogDownloadHandler(String logRoot, String daemonLogRoot, WorkerLogs workerLogs, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `downloadDaemonLogFile(String host, String fileName, String user)`
  Download a daemon log.
  `jakarta.ws.rs.core.Response`
  `downloadLogFile(String host, String fileName, String user)`
  Download a worker log.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LogviewerLogDownloadHandler

    public LogviewerLogDownloadHandler(String logRoot, String daemonLogRoot, WorkerLogs workerLogs, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry)
    Constructor.
    Parameters:
      `logRoot` - root worker log directory
      `daemonLogRoot` - root daemon log directory
      `workerLogs` - `WorkerLogs`
      `resourceAuthorizer` - `ResourceAuthorizer`
      `metricsRegistry` - The logviewer metrics registry

- ## Method Details

  - ### downloadLogFile

    public jakarta.ws.rs.core.Response downloadLogFile(String host, String fileName, String user) throws IOException
    Download a worker log.
    Parameters:
      `host` - host address
      `fileName` - file to download
      `user` - username
    Returns:
      a Response which lets browsers download that file.
    Throws:
      `IOException`

  - ### downloadDaemonLogFile

    public jakarta.ws.rs.core.Response downloadDaemonLogFile(String host, String fileName, String user) throws IOException
    Download a daemon log.
    Parameters:
      `host` - host address
      `fileName` - file to download
      `user` - username
    Returns:
      a Response which lets browsers download that file.
    Throws:
      `IOException`