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

Package org.apache.hadoop.yarn.webapp

# Class WebApps

java.lang.Object
org.apache.hadoop.yarn.webapp.WebApps

@LimitedPrivate({"YARN","MapReduce"}) public class WebApps extends Object
Helpers to create an embedded webapp. Quick start:

       WebApp wa = WebApps.$for(myApp).start();

Starts a webapp with default routes binds to 0.0.0.0 (all network interfaces) on an ephemeral port, which can be obtained with:

       int port = wa.port();

With more options:

       WebApp wa = WebApps.$for(myApp).at(address, port).
                            with(configuration).
                            start(new WebApp() {
         @Override public void setup() {
           route("/foo/action", FooController.class);
           route("/foo/:id", FooController.class, "show");
         }
       });

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `WebApps.Builder<T>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WebApps()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> WebApps.Builder<T>`
  `$for(String prefix)`
  `static <T> WebApps.Builder<T>`
  `$for(String prefix, Class<T> api, T app)`
  Create a new webapp builder.
  `static <T> WebApps.Builder<T>`
  `$for(String prefix, Class<T> api, T app, String wsPrefix)`
  Create a new webapp builder.
  `static <T> WebApps.Builder<T>`
  `$for(String prefix, T app)`
  `static <T> WebApps.Builder<T>`
  `$for(T app)`

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

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

- ## Constructor Details

  - ### WebApps

    public WebApps()

- ## Method Details

  - ### $for

    public static <T> WebApps.Builder<T> $for(String prefix, Class<T> api, T app, String wsPrefix)
    Create a new webapp builder.
    Type Parameters:
      `T` - application (holding the embedded webapp) type
    Parameters:
      `prefix` - of the webapp
      `api` - the api class for the application
      `app` - the application instance
      `wsPrefix` - the prefix for the webservice api for this app
    Returns:
      a webapp builder
    See Also:
      - `for a complete example`

  - ### $for

    public static <T> WebApps.Builder<T> $for(String prefix, Class<T> api, T app)
    Create a new webapp builder.
    Type Parameters:
      `T` - application (holding the embedded webapp) type
    Parameters:
      `prefix` - of the webapp
      `api` - the api class for the application
      `app` - the application instance
    Returns:
      a webapp builder
    See Also:
      - `for a complete example`

  - ### $for

    public static <T> WebApps.Builder<T> $for(String prefix, T app)

  - ### $for

    public static <T> WebApps.Builder<T> $for(T app)

  - ### $for

    public static <T> WebApps.Builder<T> $for(String prefix)