public class WinstoneRequest extends Object implements HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH| Constructor and Description |
|---|
WinstoneRequest()
InputStream factory method.
|
protected static DateFormat headerDF
protected static Random rnd
protected Map attributes
protected Map parameters
protected Stack attributesStack
protected Stack parametersStack
protected String[] headers
protected Cookie[] cookies
protected String method
protected String scheme
protected String serverName
protected String requestURI
protected String servletPath
protected String pathInfo
protected String queryString
protected String protocol
protected int contentLength
protected String contentType
protected String encoding
protected int serverPort
protected String remoteIP
protected String remoteName
protected int remotePort
protected String localAddr
protected String localName
protected int localPort
protected Boolean parsedParameters
getParameterMap()
(or its sibling), which requires implicit form parameter parsing.
If false, it indicates that the request body shall not be consumed by the said method, because the application
already called getInputStream() and showed the intent to parse the request body on its own.
If null, it indicates that we haven't come to that decision.protected Map requestedSessionIds
protected Map currentSessionIds
protected String deadRequestedSessionId
protected List locales
protected String authorization
protected boolean isSecure
protected WinstoneInputStream inputData
protected BufferedReader inputReader
protected ServletConfiguration servletConfig
protected WebAppConfiguration webappConfig
protected HostGroup hostGroup
protected AuthenticationPrincipal authenticatedUser
protected ServletRequestAttributeListener[] requestAttributeListeners
protected ServletRequestListener[] requestListeners
public void cleanUp()
public Map getAttributes()
public Map getParameters()
public Stack getAttributesStack()
public Stack getParametersStack()
public Map getCurrentSessionIds()
public Map getRequestedSessionIds()
public String getDeadRequestedSessionId()
public HostGroup getHostGroup()
public WebAppConfiguration getWebAppConfig()
public ServletConfiguration getServletConfig()
public String getEncoding()
public Boolean getParsedParameters()
public List getListLocales()
public void setInputStream(WinstoneInputStream inputData)
public void setHostGroup(HostGroup hostGroup)
public void setWebAppConfig(WebAppConfiguration webappConfig)
public void setServletConfig(ServletConfiguration servletConfig)
public void setServerPort(int port)
public void setRemoteIP(String remoteIP)
public void setRemoteName(String name)
public void setRemotePort(int port)
public void setLocalAddr(String ip)
public void setLocalName(String name)
public void setLocalPort(int port)
public void setMethod(String method)
public void setIsSecure(boolean isSecure)
public void setQueryString(String queryString)
public void setServerName(String name)
public void setRequestURI(String requestURI)
public void setScheme(String scheme)
public void setServletPath(String servletPath)
public void setPathInfo(String pathInfo)
public void setProtocol(String protocolString)
public void setRemoteUser(AuthenticationPrincipal user)
public void setContentLength(int len)
public void setContentType(String type)
public void setAuthorization(String auth)
public void setLocales(List locales)
public void setCurrentSessionIds(Map currentSessionIds)
public void setRequestedSessionIds(Map requestedSessionIds)
public void setDeadRequestedSessionId(String deadRequestedSessionId)
public void setEncoding(String encoding)
public void setParsedParameters(Boolean parsed)
public void setRequestListeners(ServletRequestListener[] rl)
public void setRequestAttributeListeners(ServletRequestAttributeListener[] ral)
public static void extractParameters(String urlEncodedParams, String encoding, Map outputParams, boolean overwrite)
public static String decodeURLToken(String in, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String decodeURLToken(String in, String encoding, boolean isQueryString) throws UnsupportedEncodingException
isQueryString - Decode query string, where '+' is an escape for ' '. Otherwise
decode as path token, where '+' is not an escape character.UnsupportedEncodingExceptionpublic void discardRequestBody()
public void parseRequestParameters()
public void parseHeaders(List headerList)
public void addIncludeQueryParameters(String queryString)
public void addIncludeAttributes(String requestURI, String contextPath, String servletPath, String pathInfo, String queryString)
public void removeIncludeQueryString()
public void clearIncludeStackForForward()
public void setForwardQueryString(String forwardQueryString)
public void removeIncludeAttributes()
public Object getAttribute(String name)
getAttribute in interface ServletRequestpublic Enumeration getAttributeNames()
getAttributeNames in interface ServletRequestpublic void removeAttribute(String name)
removeAttribute in interface ServletRequestpublic void setAttribute(String name, Object o)
setAttribute in interface ServletRequestpublic String getCharacterEncoding()
getCharacterEncoding in interface ServletRequestpublic void setCharacterEncoding(String encoding) throws UnsupportedEncodingException
setCharacterEncoding in interface ServletRequestUnsupportedEncodingExceptionpublic int getContentLength()
getContentLength in interface ServletRequestpublic String getContentType()
getContentType in interface ServletRequestpublic Locale getLocale()
getLocale in interface ServletRequestpublic Enumeration getLocales()
getLocales in interface ServletRequestpublic String getProtocol()
getProtocol in interface ServletRequestpublic String getScheme()
getScheme in interface ServletRequestpublic boolean isSecure()
isSecure in interface ServletRequestpublic BufferedReader getReader() throws IOException
getReader in interface ServletRequestIOExceptionpublic ServletInputStream getInputStream() throws IOException
getInputStream in interface ServletRequestIOExceptionpublic String getParameter(String name)
getParameter in interface ServletRequestpublic Enumeration getParameterNames()
getParameterNames in interface ServletRequestpublic String[] getParameterValues(String name)
getParameterValues in interface ServletRequestpublic Map getParameterMap()
getParameterMap in interface ServletRequestpublic String getServerName()
getServerName in interface ServletRequestpublic int getServerPort()
getServerPort in interface ServletRequestpublic String getRemoteAddr()
getRemoteAddr in interface ServletRequestpublic String getRemoteHost()
getRemoteHost in interface ServletRequestpublic int getRemotePort()
getRemotePort in interface ServletRequestpublic String getLocalAddr()
getLocalAddr in interface ServletRequestpublic String getLocalName()
getLocalName in interface ServletRequestpublic int getLocalPort()
getLocalPort in interface ServletRequestpublic RequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface ServletRequestpublic String getContextPath()
getContextPath in interface HttpServletRequestpublic Cookie[] getCookies()
getCookies in interface HttpServletRequestpublic long getDateHeader(String name)
getDateHeader in interface HttpServletRequestpublic int getIntHeader(String name)
getIntHeader in interface HttpServletRequestpublic String getHeader(String name)
getHeader in interface HttpServletRequestpublic Enumeration getHeaderNames()
getHeaderNames in interface HttpServletRequestpublic Enumeration getHeaders(String name)
getHeaders in interface HttpServletRequestpublic String getMethod()
getMethod in interface HttpServletRequestpublic String getPathInfo()
getPathInfo in interface HttpServletRequestpublic String getPathTranslated()
getPathTranslated in interface HttpServletRequestpublic String getQueryString()
getQueryString in interface HttpServletRequestpublic String getRequestURI()
getRequestURI in interface HttpServletRequestpublic String getServletPath()
getServletPath in interface HttpServletRequestpublic String getRequestedSessionId()
getRequestedSessionId in interface HttpServletRequestpublic StringBuffer getRequestURL()
getRequestURL in interface HttpServletRequestpublic Principal getUserPrincipal()
getUserPrincipal in interface HttpServletRequestpublic boolean isUserInRole(String role)
isUserInRole in interface HttpServletRequestpublic String getAuthType()
getAuthType in interface HttpServletRequestpublic String getRemoteUser()
getRemoteUser in interface HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface HttpServletRequestpublic boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface HttpServletRequestpublic HttpSession getSession()
getSession in interface HttpServletRequestpublic HttpSession getSession(boolean create)
getSession in interface HttpServletRequestpublic void markSessionsAsRequestFinished(long lastAccessedTime,
boolean saveSessions)
public String getRealPath(String path)
getRealPath in interface ServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface HttpServletRequestCopyright © 2014. All rights reserved.