org.apache.hadoop.yarn.webapp
Class WebApp

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

public abstract class WebApp
extends com.google.inject.servlet.ServletModule

See Also:
for a usage example

Nested Class Summary
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
WebApp()
           
 
Method Summary
 org.apache.hadoop.conf.Configuration conf()
           
 void configureServlets()
           
 InetSocketAddress getListenerAddress()
          Get the address the http server is bound to
 String getRedirectPath()
           
 String[] getServePathSpecs()
           
 org.apache.hadoop.http.HttpServer 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.
abstract  void setup()
           
 void stop()
           
 
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, 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.HttpServer 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()

getServePathSpecs

public String[] getServePathSpecs()

getRedirectPath

public String getRedirectPath()

configureServlets

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

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

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 © 2012 Apache Software Foundation. All Rights Reserved.