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
public abstract class WebApp
- extends com.google.inject.servlet.ServletModule
- See Also:
for a usage example
| Nested classes/interfaces inherited from class com.google.inject.servlet.ServletModule |
com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder, com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder |
| 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 |
WebApp
public WebApp()
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 routepathSpec - the path spec in the form of /controller/action/:args etc.cls - the controller classaction - 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.