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

      @InterfaceAudience.LimitedPrivate(value={"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 and Description
    --- | ---
    `static class` | `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 and Description
    `WebApp()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hadoop.conf.Configuration` | `conf()`
    `void` | `configureServlets()`
    `protected void` | `configureWebAppServlets()`
    `InetSocketAddress` | `getListenerAddress()` Get the address the http server is bound to
    `String` | `getRedirectPath()`
    `String[]` | `getServePathSpecs()`
    `protected Class<? extends com.sun.jersey.guice.spi.container.servlet.GuiceContainer>` | `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, filterRegex, getServletContext, serve, 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 Detail

    - #### WebApp

          public WebApp()

  - ### Method Detail

    - #### 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 com.sun.jersey.guice.spi.container.servlet.GuiceContainer> 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()

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.