Package org.apache.hadoop.yarn.webapp
Class View
java.lang.Object
org.apache.hadoop.yarn.webapp.View
- All Implemented Interfaces:
Params
- Direct Known Subclasses:
TextView
Base class for all views
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.apache.hadoop.yarn.webapp.Params
ERROR_DETAILS, TITLE, TITLE_LINK, USER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLookup a value from the current contextLookup a value from the current context.context()cookies()Get the cookieserror()<T> TgetInstance(Class<T> cls) booleancom.google.inject.Injectorinjector()javax.servlet.ServletOutputStreamprefix()abstract voidrender()The API to render the viewvoidRender a sub-viewjavax.servlet.http.HttpServletRequestrequest()javax.servlet.http.HttpServletResponseresponse()root()Create an url from url componentsvoidSet a context value.voidvoidintstatus()Create an url from url componentswriter()
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
View
public View() -
View
-
-
Method Details
-
render
public abstract void render()The API to render the view -
context
-
error
-
status
public int status() -
inDevMode
public boolean inDevMode() -
injector
public com.google.inject.Injector injector() -
getInstance
-
request
public javax.servlet.http.HttpServletRequest request() -
response
public javax.servlet.http.HttpServletResponse response() -
moreParams
-
cookies
Get the cookies- Returns:
- the cookies map
-
outputStream
public javax.servlet.ServletOutputStream outputStream() -
writer
-
$
Lookup a value from the current context.- Parameters:
key- to lookupdefaultValue- if key is missing- Returns:
- the value of the key or the default value
-
$
Lookup a value from the current context- Parameters:
key- to lookup- Returns:
- the value of the key or empty string
-
set
Set a context value. (e.g. UI properties for sub views.) Try to avoid any application (vs view/ui) logic.- Parameters:
key- to setvalue- to set
-
root
-
prefix
-
setTitle
-
setTitle
-
root_url
Create an url from url components- Parameters:
parts- components to join- Returns:
- an url string
-
url
Create an url from url components- Parameters:
parts- components to join- Returns:
- an url string
-
info
-
render
Render a sub-view- Parameters:
cls- the class of the sub-view
-