Class WebApp

java.lang.Object
com.google.inject.AbstractModule
com.google.inject.servlet.ServletModule
org.apache.hadoop.yarn.webapp.WebApp
All Implemented Interfaces:
com.google.inject.Module

@LimitedPrivate({"YARN","MapReduce"}) public abstract class WebApp extends com.google.inject.servlet.ServletModule
See Also:
  • Constructor Details

    • WebApp

      public WebApp()
  • Method Details

    • httpServer

      @Provides public org.apache.hadoop.http.HttpServer2 httpServer()
    • getListenerAddress

      public InetSocketAddress getListenerAddress()
      Get the address the http server is bound to
      Returns:
      InetSocketAddress
    • port

      public int port()
    • stop

      public void stop()
    • joinThread

      public void joinThread()
    • conf

      @Provides public org.apache.hadoop.conf.Configuration conf()
    • name

      public String name()
    • wsName

      public String wsName()
    • getServePathSpecs

      public String[] getServePathSpecs()
    • getRedirectPath

      public String getRedirectPath()
    • configureServlets

      public void configureServlets()
      Overrides:
      configureServlets in class com.google.inject.servlet.ServletModule
    • configureWebAppServlets

      protected void configureWebAppServlets()
    • getWebAppFilterClass

      protected Class<? extends javax.servlet.Filter> getWebAppFilterClass()
    • route

      public void route(WebApp.HTTP method, String pathSpec, Class<? extends Controller> cls, String action)
      Setup of a webapp serving route.
      Parameters:
      method - the http method for the route
      pathSpec - the path spec in the form of /controller/action/:args etc.
      cls - the controller class
      action - the controller method
    • routeWithoutDefaultView

      public void routeWithoutDefaultView(String pathSpec, Class<? extends Controller> cls, String action)
      Setup of a webapp serving route without default views added to the page.
      Parameters:
      pathSpec - the path spec in the form of /controller/action/:args etc.
      cls - the controller class
      action - the controller method
    • route

      public void route(String pathSpec, Class<? extends Controller> cls, String action)
    • route

      public void route(String pathSpec, Class<? extends Controller> cls)
    • setup

      public abstract void setup()
    • getHttpServer

      @VisibleForTesting public org.apache.hadoop.http.HttpServer2 getHttpServer()