@InterfaceAudience.LimitedPrivate(value={"YARN","MapReduce"})
public abstract class WebApp
extends com.google.inject.servlet.ServletModule
for a usage example
Modifier and Type | Class and Description |
---|---|
static class |
WebApp.HTTP |
Constructor and Description |
---|
WebApp() |
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() |
configure, filter, filterRegex, getServletContext, serve, serveRegex
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
@Provides public org.apache.hadoop.http.HttpServer2 httpServer()
public InetSocketAddress getListenerAddress()
public int port()
public void stop()
public void joinThread()
@Provides public org.apache.hadoop.conf.Configuration conf()
public String name()
public String wsName()
public String[] getServePathSpecs()
public String getRedirectPath()
public void configureServlets()
configureServlets
in class com.google.inject.servlet.ServletModule
protected void configureWebAppServlets()
protected Class<? extends com.sun.jersey.guice.spi.container.servlet.GuiceContainer> getWebAppFilterClass()
public void route(WebApp.HTTP method, String pathSpec, Class<? extends Controller> cls, String action)
method
- the http method for the routepathSpec
- the path spec in the form of /controller/action/:args etc.cls
- the controller classaction
- the controller methodpublic void routeWithoutDefaultView(String pathSpec, Class<? extends Controller> cls, String action)
pathSpec
- the path spec in the form of /controller/action/:args etc.cls
- the controller classaction
- the controller methodpublic void route(String pathSpec, Class<? extends Controller> cls, String action)
public void route(String pathSpec, Class<? extends Controller> cls)
public abstract void setup()
Copyright © 2008–2019 Apache Software Foundation. All rights reserved.