Class WebServer

java.lang.Object
org.apache.drill.exec.server.rest.WebServer
All Implemented Interfaces:
AutoCloseable

public class WebServer extends Object implements AutoCloseable
Wrapper class around jetty based web server.
  • Constructor Details

    • WebServer

      public WebServer(BootStrapContext context, WorkManager workManager, Drillbit drillbit)
      Create Jetty based web server.
      Parameters:
      context - Bootstrap context.
      workManager - WorkManager instance.
      drillbit - Drillbit instance.
  • Method Details

    • isOnlyImpersonationEnabled

      public static boolean isOnlyImpersonationEnabled(DrillConfig config)
      Checks if only impersonation is enabled.
      Parameters:
      config - Drill configuration
      Returns:
      true if impersonation without authentication is enabled, false otherwise
    • start

      public void start() throws Exception
      Start the web server including setup.
      Throws:
      Exception
    • getPort

      public int getPort()
    • isRunning

      public boolean isRunning()
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • getOrCreateTmpJavaScriptDir

      public File getOrCreateTmpJavaScriptDir()
      Creates if not exists, and returns File for temporary Javascript directory
      Returns:
      file handle