|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.wayback.util.webapp.AbstractRequestHandler
public abstract class AbstractRequestHandler
Abstract RequestHandler implementation which performs the minimal behavior for self registration with a RequestMapper, requiring subclasses to implement only handleRequest().
| Constructor Summary | |
|---|---|
AbstractRequestHandler()
|
|
| Method Summary | |
|---|---|
String |
getBeanName()
|
static String |
getMapParam(Map<String,String[]> queryMap,
String field)
Extract the first value in the array mapped to by field in queryMap |
static String |
getMapParamOrEmpty(Map<String,String[]> map,
String param)
Extract the first value in the array mapped to by field in queryMap |
static String |
getRequiredMapParam(Map<String,String[]> queryMap,
String field)
Extract the first value in the array mapped to by field in queryMap |
javax.servlet.ServletContext |
getServletContext()
|
void |
registerPortListener(RequestMapper requestMapper)
Called at webapp context initialization, to allow the RequestHandler to register itself with the RequestMapper, which will delegate request handling to the appropriate RequestHandler. |
void |
setBeanName(String beanName)
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
Called before registerPortListener(), to enable the registration process and subsequent handleRequest() calls to access the ServletContext, via the getServletContext() method. |
String |
translateRequestPath(javax.servlet.http.HttpServletRequest httpRequest)
|
String |
translateRequestPathQuery(javax.servlet.http.HttpServletRequest httpRequest)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.archive.wayback.util.webapp.RequestHandler |
|---|
handleRequest |
| Constructor Detail |
|---|
public AbstractRequestHandler()
| Method Detail |
|---|
public void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic String getBeanName()
getBeanName in interface RequestHandlerpublic void setServletContext(javax.servlet.ServletContext servletContext)
RequestHandler
setServletContext in interface RequestHandlerservletContext - the ServletContext where the RequestHandler is
registered.public javax.servlet.ServletContext getServletContext()
getServletContext in interface RequestHandlerpublic void registerPortListener(RequestMapper requestMapper)
RequestHandler
registerPortListener in interface RequestHandlerrequestMapper - the RequestMapper on which this RequestHandler
should register itself, including to register for notification of context
shutdown.public String translateRequestPath(javax.servlet.http.HttpServletRequest httpRequest)
translateRequestPath in interface RequestHandlerhttpRequest - the HttpServletRequest being handled
public String translateRequestPathQuery(javax.servlet.http.HttpServletRequest httpRequest)
translateRequestPathQuery in interface RequestHandlerhttpRequest - the HttpServletRequest being handled
public static String getMapParam(Map<String,String[]> queryMap,
String field)
queryMap - the Map in which to searchfield - the field value desired
public static String getRequiredMapParam(Map<String,String[]> queryMap,
String field)
throws BadQueryException
queryMap - the Map in which to searchfield - the field value desired
BadQueryException - if there is nothing mapped to field, or if the
Array mapped to field is empty
public static String getMapParamOrEmpty(Map<String,String[]> map,
String param)
map - the Map in which to searchparam - the field value desired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||