public abstract class AbstractRequestHandler extends Object implements RequestHandler
Constructor and Description |
---|
AbstractRequestHandler() |
Modifier and Type | Method and Description |
---|---|
String |
getAccessPointPath() |
String |
getBeanName() |
int |
getInternalPort() |
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)
Deprecated.
2014-04-24 call
BeanNameRegistrar.registerHandler(RequestHandler, RequestMapper) directly. |
void |
setAccessPointPath(String accessPointPath) |
void |
setBeanName(String beanName) |
void |
setInternalPort(int internalPort) |
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)
Deprecated.
2014-04-23 use
RequestMapper.getRequestContextPath(HttpServletRequest) directly. |
String |
translateRequestPathQuery(javax.servlet.http.HttpServletRequest httpRequest)
Deprecated.
2014-04-23 use
RequestMapper.getRequestContextPathQuery(HttpServletRequest) directly |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleRequest
public void setBeanName(String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public String getBeanName()
getBeanName
in interface RequestHandler
public int getInternalPort()
public void setInternalPort(int internalPort)
public String getAccessPointPath()
public void setAccessPointPath(String accessPointPath)
public void setServletContext(javax.servlet.ServletContext servletContext)
RequestHandler
setServletContext
in interface RequestHandler
servletContext
- the ServletContext where the RequestHandler is
registered.public javax.servlet.ServletContext getServletContext()
getServletContext
in interface RequestHandler
public void registerPortListener(RequestMapper requestMapper)
BeanNameRegistrar.registerHandler(RequestHandler, RequestMapper)
directly.RequestHandler
registerPortListener
in interface RequestHandler
requestMapper
- 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)
RequestMapper.getRequestContextPath(HttpServletRequest)
directly.translateRequestPath
in interface RequestHandler
httpRequest
- the HttpServletRequest being handledpublic String translateRequestPathQuery(javax.servlet.http.HttpServletRequest httpRequest)
RequestMapper.getRequestContextPathQuery(HttpServletRequest)
directlytranslateRequestPathQuery
in interface RequestHandler
httpRequest
- the HttpServletRequest being handledpublic static String getMapParam(Map<String,String[]> queryMap, String field)
queryMap
- the Map in which to searchfield
- the field value desiredpublic static String getRequiredMapParam(Map<String,String[]> queryMap, String field) throws BadQueryException
queryMap
- the Map in which to searchfield
- the field value desiredBadQueryException
- if there is nothing mapped to field, or if the
Array mapped to field is emptypublic static String getMapParamOrEmpty(Map<String,String[]> map, String param)
map
- the Map in which to searchparam
- the field value desiredCopyright © 2005–2015 IIPC. All rights reserved.