|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwinstone.WinstoneRequest
public class WinstoneRequest
Implements the request interface required by the servlet spec.
Field Summary | |
---|---|
protected java.util.Map |
attributes
|
protected java.util.Stack |
attributesStack
|
protected AuthenticationPrincipal |
authenticatedUser
|
protected java.lang.String |
authorization
|
protected int |
contentLength
|
protected java.lang.String |
contentType
|
protected Cookie[] |
cookies
|
protected java.util.Map |
currentSessionIds
|
protected java.lang.String |
deadRequestedSessionId
|
protected java.lang.String |
encoding
|
protected static java.text.DateFormat |
headerDF
|
protected java.lang.String[] |
headers
|
protected HostGroup |
hostGroup
|
protected WinstoneInputStream |
inputData
|
protected java.io.BufferedReader |
inputReader
|
protected boolean |
isSecure
|
protected java.lang.String |
localAddr
|
protected java.util.List |
locales
|
protected java.lang.String |
localName
|
protected int |
localPort
|
protected java.lang.String |
method
|
protected java.util.Map |
parameters
|
protected java.util.Stack |
parametersStack
|
protected java.lang.Boolean |
parsedParameters
If true, it indicates that the request body was already consumed because of the call to getParameterMap()
(or its sibling), which requires implicit form parameter parsing. |
protected java.lang.String |
pathInfo
|
protected java.lang.String |
protocol
|
protected java.lang.String |
queryString
|
protected java.lang.String |
remoteIP
|
protected java.lang.String |
remoteName
|
protected int |
remotePort
|
protected ServletRequestAttributeListener[] |
requestAttributeListeners
|
protected java.util.Map |
requestedSessionIds
|
protected ServletRequestListener[] |
requestListeners
|
protected java.lang.String |
requestURI
|
protected static java.util.Random |
rnd
|
protected java.lang.String |
scheme
|
protected java.lang.String |
serverName
|
protected int |
serverPort
|
protected ServletConfiguration |
servletConfig
|
protected java.lang.String |
servletPath
|
protected WebAppConfiguration |
webappConfig
|
Fields inherited from interface javax.servlet.http.HttpServletRequest |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
WinstoneRequest()
InputStream factory method. |
Method Summary | |
---|---|
void |
addIncludeAttributes(java.lang.String requestURI,
java.lang.String contextPath,
java.lang.String servletPath,
java.lang.String pathInfo,
java.lang.String queryString)
|
void |
addIncludeQueryParameters(java.lang.String queryString)
|
void |
cleanUp()
Resets the request to be reused |
void |
clearIncludeStackForForward()
|
static java.lang.String |
decodeURLToken(java.lang.String in)
|
static java.lang.String |
decodeURLToken(java.lang.String in,
boolean isQueryString)
|
static java.lang.String |
decodeURLToken(java.lang.String in,
java.lang.String encoding)
For decoding the URL encoding used on query strings |
static java.lang.String |
decodeURLToken(java.lang.String in,
java.lang.String encoding,
boolean isQueryString)
|
void |
discardRequestBody()
|
static void |
extractParameters(java.lang.String urlEncodedParams,
java.lang.String encoding,
java.util.Map outputParams,
boolean overwrite)
Gets parameters from the url encoded parameter string |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.util.Enumeration |
getAttributeNames()
|
java.util.Map |
getAttributes()
|
java.util.Stack |
getAttributesStack()
|
java.lang.String |
getAuthType()
|
java.lang.String |
getCharacterEncoding()
|
int |
getContentLength()
|
java.lang.String |
getContentType()
|
java.lang.String |
getContextPath()
|
Cookie[] |
getCookies()
|
java.util.Map |
getCurrentSessionIds()
|
long |
getDateHeader(java.lang.String name)
|
java.lang.String |
getDeadRequestedSessionId()
|
java.lang.String |
getEncoding()
|
java.lang.String |
getHeader(java.lang.String name)
|
java.util.Enumeration |
getHeaderNames()
|
java.util.Enumeration |
getHeaders(java.lang.String name)
|
HostGroup |
getHostGroup()
|
ServletInputStream |
getInputStream()
|
int |
getIntHeader(java.lang.String name)
|
java.util.List |
getListLocales()
|
java.lang.String |
getLocalAddr()
|
java.util.Locale |
getLocale()
|
java.util.Enumeration |
getLocales()
|
java.lang.String |
getLocalName()
|
int |
getLocalPort()
|
java.lang.String |
getMethod()
|
java.lang.String |
getParameter(java.lang.String name)
|
java.util.Map |
getParameterMap()
|
java.util.Enumeration |
getParameterNames()
|
java.util.Map |
getParameters()
|
java.util.Stack |
getParametersStack()
|
java.lang.String[] |
getParameterValues(java.lang.String name)
|
java.lang.Boolean |
getParsedParameters()
|
java.lang.String |
getPathInfo()
|
java.lang.String |
getPathTranslated()
|
java.lang.String |
getProtocol()
|
java.lang.String |
getQueryString()
|
java.io.BufferedReader |
getReader()
|
java.lang.String |
getRealPath(java.lang.String path)
Deprecated. |
java.lang.String |
getRemoteAddr()
|
java.lang.String |
getRemoteHost()
|
int |
getRemotePort()
|
java.lang.String |
getRemoteUser()
|
RequestDispatcher |
getRequestDispatcher(java.lang.String path)
|
java.lang.String |
getRequestedSessionId()
|
java.util.Map |
getRequestedSessionIds()
|
java.lang.String |
getRequestURI()
|
java.lang.StringBuffer |
getRequestURL()
|
java.lang.String |
getScheme()
|
java.lang.String |
getServerName()
|
int |
getServerPort()
|
ServletConfiguration |
getServletConfig()
|
java.lang.String |
getServletPath()
|
HttpSession |
getSession()
|
HttpSession |
getSession(boolean create)
|
java.security.Principal |
getUserPrincipal()
|
WebAppConfiguration |
getWebAppConfig()
|
boolean |
isRequestedSessionIdFromCookie()
|
boolean |
isRequestedSessionIdFromUrl()
Deprecated. |
boolean |
isRequestedSessionIdFromURL()
|
boolean |
isRequestedSessionIdValid()
|
boolean |
isSecure()
|
boolean |
isUserInRole(java.lang.String role)
|
void |
markSessionsAsRequestFinished(long lastAccessedTime,
boolean saveSessions)
|
void |
parseHeaders(java.util.List headerList)
Go through the list of headers, and build the headers/cookies arrays for the request object. |
void |
parseRequestParameters()
This takes the parameters in the body of the request and puts them into the parameters map. |
void |
removeAttribute(java.lang.String name)
|
void |
removeIncludeAttributes()
|
void |
removeIncludeQueryString()
|
void |
setAttribute(java.lang.String name,
java.lang.Object o)
|
void |
setAuthorization(java.lang.String auth)
|
void |
setCharacterEncoding(java.lang.String encoding)
|
void |
setContentLength(int len)
|
void |
setContentType(java.lang.String type)
|
void |
setCurrentSessionIds(java.util.Map currentSessionIds)
|
void |
setDeadRequestedSessionId(java.lang.String deadRequestedSessionId)
|
void |
setEncoding(java.lang.String encoding)
|
void |
setForwardQueryString(java.lang.String forwardQueryString)
|
void |
setHostGroup(HostGroup hostGroup)
|
void |
setInputStream(WinstoneInputStream inputData)
|
void |
setIsSecure(boolean isSecure)
|
void |
setLocalAddr(java.lang.String ip)
|
void |
setLocales(java.util.List locales)
|
void |
setLocalName(java.lang.String name)
|
void |
setLocalPort(int port)
|
void |
setMethod(java.lang.String method)
|
void |
setParsedParameters(java.lang.Boolean parsed)
|
void |
setPathInfo(java.lang.String pathInfo)
|
void |
setProtocol(java.lang.String protocolString)
|
void |
setQueryString(java.lang.String queryString)
|
void |
setRemoteIP(java.lang.String remoteIP)
|
void |
setRemoteName(java.lang.String name)
|
void |
setRemotePort(int port)
|
void |
setRemoteUser(AuthenticationPrincipal user)
|
void |
setRequestAttributeListeners(ServletRequestAttributeListener[] ral)
|
void |
setRequestedSessionIds(java.util.Map requestedSessionIds)
|
void |
setRequestListeners(ServletRequestListener[] rl)
|
void |
setRequestURI(java.lang.String requestURI)
|
void |
setScheme(java.lang.String scheme)
|
void |
setServerName(java.lang.String name)
|
void |
setServerPort(int port)
|
void |
setServletConfig(ServletConfiguration servletConfig)
|
void |
setServletPath(java.lang.String servletPath)
|
void |
setWebAppConfig(WebAppConfiguration webappConfig)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.text.DateFormat headerDF
protected static java.util.Random rnd
protected java.util.Map attributes
protected java.util.Map parameters
protected java.util.Stack attributesStack
protected java.util.Stack parametersStack
protected java.lang.String[] headers
protected Cookie[] cookies
protected java.lang.String method
protected java.lang.String scheme
protected java.lang.String serverName
protected java.lang.String requestURI
protected java.lang.String servletPath
protected java.lang.String pathInfo
protected java.lang.String queryString
protected java.lang.String protocol
protected int contentLength
protected java.lang.String contentType
protected java.lang.String encoding
protected int serverPort
protected java.lang.String remoteIP
protected java.lang.String remoteName
protected int remotePort
protected java.lang.String localAddr
protected java.lang.String localName
protected int localPort
protected java.lang.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 java.util.Map requestedSessionIds
protected java.util.Map currentSessionIds
protected java.lang.String deadRequestedSessionId
protected java.util.List locales
protected java.lang.String authorization
protected boolean isSecure
protected WinstoneInputStream inputData
protected java.io.BufferedReader inputReader
protected ServletConfiguration servletConfig
protected WebAppConfiguration webappConfig
protected HostGroup hostGroup
protected AuthenticationPrincipal authenticatedUser
protected ServletRequestAttributeListener[] requestAttributeListeners
protected ServletRequestListener[] requestListeners
Constructor Detail |
---|
public WinstoneRequest()
Method Detail |
---|
public void cleanUp()
public java.util.Map getAttributes()
public java.util.Map getParameters()
public java.util.Stack getAttributesStack()
public java.util.Stack getParametersStack()
public java.util.Map getCurrentSessionIds()
public java.util.Map getRequestedSessionIds()
public java.lang.String getDeadRequestedSessionId()
public HostGroup getHostGroup()
public WebAppConfiguration getWebAppConfig()
public ServletConfiguration getServletConfig()
public java.lang.String getEncoding()
public java.lang.Boolean getParsedParameters()
public java.util.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(java.lang.String remoteIP)
public void setRemoteName(java.lang.String name)
public void setRemotePort(int port)
public void setLocalAddr(java.lang.String ip)
public void setLocalName(java.lang.String name)
public void setLocalPort(int port)
public void setMethod(java.lang.String method)
public void setIsSecure(boolean isSecure)
public void setQueryString(java.lang.String queryString)
public void setServerName(java.lang.String name)
public void setRequestURI(java.lang.String requestURI)
public void setScheme(java.lang.String scheme)
public void setServletPath(java.lang.String servletPath)
public void setPathInfo(java.lang.String pathInfo)
public void setProtocol(java.lang.String protocolString)
public void setRemoteUser(AuthenticationPrincipal user)
public void setContentLength(int len)
public void setContentType(java.lang.String type)
public void setAuthorization(java.lang.String auth)
public void setLocales(java.util.List locales)
public void setCurrentSessionIds(java.util.Map currentSessionIds)
public void setRequestedSessionIds(java.util.Map requestedSessionIds)
public void setDeadRequestedSessionId(java.lang.String deadRequestedSessionId)
public void setEncoding(java.lang.String encoding)
public void setParsedParameters(java.lang.Boolean parsed)
public void setRequestListeners(ServletRequestListener[] rl)
public void setRequestAttributeListeners(ServletRequestAttributeListener[] ral)
public static void extractParameters(java.lang.String urlEncodedParams, java.lang.String encoding, java.util.Map outputParams, boolean overwrite)
public static java.lang.String decodeURLToken(java.lang.String in)
public static java.lang.String decodeURLToken(java.lang.String in, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public static java.lang.String decodeURLToken(java.lang.String in, boolean isQueryString)
public static java.lang.String decodeURLToken(java.lang.String in, java.lang.String encoding, boolean isQueryString) throws java.io.UnsupportedEncodingException
isQueryString
- Decode query string, where '+' is an escape for ' '. Otherwise
decode as path token, where '+' is not an escape character.
java.io.UnsupportedEncodingException
public void discardRequestBody()
public void parseRequestParameters()
public void parseHeaders(java.util.List headerList)
public void addIncludeQueryParameters(java.lang.String queryString)
public void addIncludeAttributes(java.lang.String requestURI, java.lang.String contextPath, java.lang.String servletPath, java.lang.String pathInfo, java.lang.String queryString)
public void removeIncludeQueryString()
public void clearIncludeStackForForward()
public void setForwardQueryString(java.lang.String forwardQueryString)
public void removeIncludeAttributes()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface ServletRequest
public java.util.Enumeration getAttributeNames()
getAttributeNames
in interface ServletRequest
public void removeAttribute(java.lang.String name)
removeAttribute
in interface ServletRequest
public void setAttribute(java.lang.String name, java.lang.Object o)
setAttribute
in interface ServletRequest
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface ServletRequest
public void setCharacterEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException
setCharacterEncoding
in interface ServletRequest
java.io.UnsupportedEncodingException
public int getContentLength()
getContentLength
in interface ServletRequest
public java.lang.String getContentType()
getContentType
in interface ServletRequest
public java.util.Locale getLocale()
getLocale
in interface ServletRequest
public java.util.Enumeration getLocales()
getLocales
in interface ServletRequest
public java.lang.String getProtocol()
getProtocol
in interface ServletRequest
public java.lang.String getScheme()
getScheme
in interface ServletRequest
public boolean isSecure()
isSecure
in interface ServletRequest
public java.io.BufferedReader getReader() throws java.io.IOException
getReader
in interface ServletRequest
java.io.IOException
public ServletInputStream getInputStream() throws java.io.IOException
getInputStream
in interface ServletRequest
java.io.IOException
public java.lang.String getParameter(java.lang.String name)
getParameter
in interface ServletRequest
public java.util.Enumeration getParameterNames()
getParameterNames
in interface ServletRequest
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues
in interface ServletRequest
public java.util.Map getParameterMap()
getParameterMap
in interface ServletRequest
public java.lang.String getServerName()
getServerName
in interface ServletRequest
public int getServerPort()
getServerPort
in interface ServletRequest
public java.lang.String getRemoteAddr()
getRemoteAddr
in interface ServletRequest
public java.lang.String getRemoteHost()
getRemoteHost
in interface ServletRequest
public int getRemotePort()
getRemotePort
in interface ServletRequest
public java.lang.String getLocalAddr()
getLocalAddr
in interface ServletRequest
public java.lang.String getLocalName()
getLocalName
in interface ServletRequest
public int getLocalPort()
getLocalPort
in interface ServletRequest
public RequestDispatcher getRequestDispatcher(java.lang.String path)
getRequestDispatcher
in interface ServletRequest
public java.lang.String getContextPath()
getContextPath
in interface HttpServletRequest
public Cookie[] getCookies()
getCookies
in interface HttpServletRequest
public long getDateHeader(java.lang.String name)
getDateHeader
in interface HttpServletRequest
public int getIntHeader(java.lang.String name)
getIntHeader
in interface HttpServletRequest
public java.lang.String getHeader(java.lang.String name)
getHeader
in interface HttpServletRequest
public java.util.Enumeration getHeaderNames()
getHeaderNames
in interface HttpServletRequest
public java.util.Enumeration getHeaders(java.lang.String name)
getHeaders
in interface HttpServletRequest
public java.lang.String getMethod()
getMethod
in interface HttpServletRequest
public java.lang.String getPathInfo()
getPathInfo
in interface HttpServletRequest
public java.lang.String getPathTranslated()
getPathTranslated
in interface HttpServletRequest
public java.lang.String getQueryString()
getQueryString
in interface HttpServletRequest
public java.lang.String getRequestURI()
getRequestURI
in interface HttpServletRequest
public java.lang.String getServletPath()
getServletPath
in interface HttpServletRequest
public java.lang.String getRequestedSessionId()
getRequestedSessionId
in interface HttpServletRequest
public java.lang.StringBuffer getRequestURL()
getRequestURL
in interface HttpServletRequest
public java.security.Principal getUserPrincipal()
getUserPrincipal
in interface HttpServletRequest
public boolean isUserInRole(java.lang.String role)
isUserInRole
in interface HttpServletRequest
public java.lang.String getAuthType()
getAuthType
in interface HttpServletRequest
public java.lang.String getRemoteUser()
getRemoteUser
in interface HttpServletRequest
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie
in interface HttpServletRequest
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL
in interface HttpServletRequest
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface HttpServletRequest
public HttpSession getSession()
getSession
in interface HttpServletRequest
public HttpSession getSession(boolean create)
getSession
in interface HttpServletRequest
public void markSessionsAsRequestFinished(long lastAccessedTime, boolean saveSessions)
public java.lang.String getRealPath(java.lang.String path)
getRealPath
in interface ServletRequest
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl
in interface HttpServletRequest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |