WebApp (Apache Hadoop YARN Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.webapp, class: WebApp

Package org.apache.hadoop.yarn.webapp

# 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:
  - `for a usage example`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `WebApp.HTTP`

  ## Nested classes/interfaces inherited from class com.google.inject.servlet.ServletModule

  `com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder, com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WebApp()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.apache.hadoop.conf.Configuration`
  `conf()`
  `void`
  `configureServlets()`
  `protected void`
  `configureWebAppServlets()`
  `org.apache.hadoop.http.HttpServer2`
  `getHttpServer()`
  `InetSocketAddress`
  `getListenerAddress()`
  Get the address the http server is bound to
  `String`
  `getRedirectPath()`
  `String[]`
  `getServePathSpecs()`
  `protected Class<? extends javax.servlet.Filter>`
  `getWebAppFilterClass()`
  `org.apache.hadoop.http.HttpServer2`
  `httpServer()`
  `void`
  `joinThread()`
  `String`
  `name()`
  `int`
  `port()`
  `void`
  `route(String pathSpec, Class<? extends Controller> cls)`
  `void`
  `route(String pathSpec, Class<? extends Controller> cls, String action)`
  `void`
  `route(WebApp.HTTP method, String pathSpec, Class<? extends Controller> cls, String action)`
  Setup of a webapp serving route.
  `void`
  `routeWithoutDefaultView(String pathSpec, Class<? extends Controller> cls, String action)`
  Setup of a webapp serving route without default views added to the page.
  `abstract void`
  `setup()`
  `void`
  `stop()`
  `String`
  `wsName()`

  ### Methods inherited from class com.google.inject.servlet.ServletModule

  `configure, filter, filter, filterRegex, filterRegex, getServletContext, serve, serve, serveRegex, serveRegex`

  ### Methods inherited from class com.google.inject.AbstractModule

  `addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding`

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

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

- ## 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()