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:
-
Nested Class Summary
Nested ClassesNested 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 -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.conf.Configurationconf()voidprotected voidorg.apache.hadoop.http.HttpServer2Get the address the http server is bound toString[]protected Class<? extends javax.servlet.Filter>org.apache.hadoop.http.HttpServer2voidname()intport()voidroute(String pathSpec, Class<? extends Controller> cls) voidroute(String pathSpec, Class<? extends Controller> cls, String action) voidroute(WebApp.HTTP method, String pathSpec, Class<? extends Controller> cls, String action) Setup of a webapp serving route.voidrouteWithoutDefaultView(String pathSpec, Class<? extends Controller> cls, String action) Setup of a webapp serving route without default views added to the page.abstract voidsetup()voidstop()wsName()Methods inherited from class com.google.inject.servlet.ServletModule
configure, filter, filter, filterRegex, filterRegex, getServletContext, serve, serve, serveRegex, serveRegexMethods 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
-
Constructor Details
-
WebApp
public WebApp()
-
-
Method Details
-
httpServer
@Provides public org.apache.hadoop.http.HttpServer2 httpServer() -
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
-
wsName
-
getServePathSpecs
-
getRedirectPath
-
configureServlets
public void configureServlets()- Overrides:
configureServletsin classcom.google.inject.servlet.ServletModule
-
configureWebAppServlets
protected void configureWebAppServlets() -
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 routepathSpec- the path spec in the form of /controller/action/:args etc.cls- the controller classaction- 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 classaction- the controller method
-
route
-
route
-
setup
public abstract void setup() -
getHttpServer
@VisibleForTesting public org.apache.hadoop.http.HttpServer2 getHttpServer()
-