public class HttpRequestImpl extends java.lang.Object implements HttpRequest
Modifier and Type | Class and Description |
---|---|
protected class |
HttpRequestImpl.SessionInvalidateListener |
HttpRequest.Method
Modifier and Type | Field and Description |
---|---|
static java.lang.reflect.InvocationHandler |
SERVLET_CONTEXT_HANDLER |
static java.lang.Class<?>[] |
SERVLET_CONTEXT_INTERFACES |
HEADER_ACCEPT, HEADER_ACCEPT_ENCODING, HEADER_ACCEPT_LANGUAGE, HEADER_CACHE_CONTROL, HEADER_CONNECTION, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_HOST, HEADER_SET_COOKIE, HEADER_USER_AGENT, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE
Constructor and Description |
---|
HttpRequestImpl(java.net.URI socketURI) |
Modifier and Type | Method and Description |
---|---|
void |
addInternalParameter(java.lang.String key,
java.lang.String val) |
void |
addQueryParams(java.lang.String query) |
boolean |
authenticate(HttpServletResponse httpServletResponse) |
java.lang.String |
changeSessionId() |
void |
destroy() |
java.lang.String |
extractContextPath() |
AsyncContext |
getAsyncContext() |
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
java.lang.String |
getAuthType() |
java.lang.String |
getCharacterEncoding() |
int |
getContentLength() |
long |
getContentLengthLong() |
java.lang.String |
getContentType() |
java.lang.String |
getContextPath() |
protected java.lang.String |
getCookie(java.lang.String name) |
Cookie[] |
getCookies() |
long |
getDateHeader(java.lang.String s) |
DispatcherType |
getDispatcherType() |
java.lang.String |
getFormParameter(java.lang.String name)
Gets a form parameter based on the name passed in.
|
java.util.Map<java.lang.String,java.lang.String> |
getFormParameters() |
java.lang.String |
getHeader(java.lang.String name)
Gets a header based the header name passed in.
|
java.util.Enumeration<java.lang.String> |
getHeaderNames() |
java.util.Enumeration<java.lang.String> |
getHeaders(java.lang.String s) |
ServletInputStream |
getInputStream() |
protected java.util.Map<?,?> |
getInternalCookies() |
int |
getIntHeader(java.lang.String s) |
java.lang.String |
getLocalAddr() |
java.util.Locale |
getLocale() |
java.util.Enumeration<java.util.Locale> |
getLocales() |
java.lang.String |
getLocalName() |
int |
getLocalPort() |
java.lang.String |
getMethod()
Gets the request method.
|
java.lang.String |
getParameter(java.lang.String name)
Gets a form or URL query parameter based on the name passed in.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap() |
java.util.Enumeration<java.lang.String> |
getParameterNames() |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Deprecated.
|
java.lang.String[] |
getParameterValues(java.lang.String s) |
Part |
getPart(java.lang.String s) |
java.util.Collection<Part> |
getParts() |
java.lang.String |
getPathInfo() |
java.lang.String |
getPathTranslated() |
java.lang.String |
getProtocol() |
java.lang.String |
getProtocolRequestId() |
java.lang.String |
getQueryString() |
java.io.BufferedReader |
getReader() |
java.lang.String |
getRemoteAddr() |
java.lang.String |
getRemoteHost() |
int |
getRemotePort() |
java.lang.String |
getRemoteUser() |
RequestDispatcher |
getRequestDispatcher(java.lang.String s) |
java.lang.String |
getRequestedSessionId() |
java.lang.String |
getRequestId() |
java.lang.String |
getRequestURI() |
java.lang.StringBuffer |
getRequestURL() |
java.lang.String |
getScheme() |
java.lang.String |
getServerName() |
int |
getServerPort() |
ServletConnection |
getServletConnection() |
ServletContext |
getServletContext() |
java.lang.String |
getServletPath() |
HttpSession |
getSession() |
HttpSession |
getSession(boolean create) |
protected java.net.URI |
getSocketURI() |
java.net.URI |
getURI()
Gets the URI for the current URL page.
|
java.security.Principal |
getUserPrincipal() |
void |
init() |
void |
initPathFromContext(java.lang.String context) |
void |
initServletPath(java.lang.String servlet) |
boolean |
isAsyncStarted() |
boolean |
isAsyncSupported() |
boolean |
isRequestedSessionIdFromCookie() |
boolean |
isRequestedSessionIdFromURL() |
boolean |
isRequestedSessionIdValid() |
boolean |
isSecure() |
boolean |
isUserInRole(java.lang.String s) |
void |
login(java.lang.String s,
java.lang.String s1) |
void |
logout() |
void |
noPathInfo() |
void |
parseURI(java.util.StringTokenizer lineParts)
parses the URI into the different parts
|
void |
print(Logger log,
boolean formatXml) |
protected boolean |
readMessage(java.io.InputStream input)
parses the request into the 3 different parts, request, headers, and body
|
void |
removeAttribute(java.lang.String s) |
java.lang.String |
requestRawPath() |
void |
setApplication(WebContext app) |
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setBeginListener(BeginWebBeansListener begin) |
void |
setCharacterEncoding(java.lang.String s) |
void |
setEndListener(EndWebBeansListener end) |
void |
setPath(java.lang.String path) |
void |
setUri(java.net.URI uri) |
AsyncContext |
startAsync() |
AsyncContext |
startAsync(ServletRequest servletRequest,
ServletResponse servletResponse) |
<T extends HttpUpgradeHandler> |
upgrade(java.lang.Class<T> httpUpgradeHandlerClass) |
public static final java.lang.Class<?>[] SERVLET_CONTEXT_INTERFACES
public static final java.lang.reflect.InvocationHandler SERVLET_CONTEXT_HANDLER
public void setUri(java.net.URI uri)
public java.lang.String getHeader(java.lang.String name)
name
- The name of the header to getpublic java.util.Enumeration<java.lang.String> getHeaderNames()
public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String s)
public int getIntHeader(java.lang.String s)
public java.lang.String getFormParameter(java.lang.String name)
name
- The name of the form parameter to getpublic java.util.Map<java.lang.String,java.lang.String> getFormParameters()
public java.lang.String getMethod()
public Part getPart(java.lang.String s) throws java.io.IOException, ServletException
java.io.IOException
ServletException
public <T extends HttpUpgradeHandler> T upgrade(java.lang.Class<T> httpUpgradeHandlerClass) throws java.io.IOException, ServletException
java.io.IOException
ServletException
public java.util.Collection<Part> getParts() throws java.io.IOException, ServletException
java.io.IOException
ServletException
public void noPathInfo()
public java.lang.String getPathInfo()
public java.lang.String getPathTranslated()
public java.lang.String getQueryString()
public java.lang.String getRemoteUser()
public java.lang.String getRequestedSessionId()
public java.lang.String getRequestURI()
public java.lang.StringBuffer getRequestURL()
public java.lang.String getServletPath()
public void initServletPath(java.lang.String servlet)
public void addQueryParams(java.lang.String query)
public java.net.URI getURI()
getURI
in interface HttpRequest
public int getContentLength()
getContentLength
in interface HttpRequest
public long getContentLengthLong()
public java.lang.String getContentType()
getContentType
in interface HttpRequest
public DispatcherType getDispatcherType()
public java.lang.String getRequestId()
public java.lang.String getProtocolRequestId()
public ServletConnection getServletConnection()
public ServletInputStream getInputStream() throws java.io.IOException
java.io.IOException
public java.lang.String getLocalAddr()
public java.util.Locale getLocale()
public java.util.Enumeration<java.util.Locale> getLocales()
public java.lang.String getLocalName()
public int getLocalPort()
protected boolean readMessage(java.io.InputStream input) throws java.io.IOException
input
- the data input for this pagejava.io.IOException
- if an exception is thrownpublic void print(Logger log, boolean formatXml)
public void parseURI(java.util.StringTokenizer lineParts) throws java.io.IOException
lineParts
- a StringTokenizer of the URIjava.io.IOException
- if an exeption is thrownpublic boolean authenticate(HttpServletResponse httpServletResponse) throws java.io.IOException, ServletException
java.io.IOException
ServletException
public java.lang.String getAuthType()
public java.lang.String getContextPath()
public java.lang.String extractContextPath()
public Cookie[] getCookies()
protected java.util.Map<?,?> getInternalCookies()
public long getDateHeader(java.lang.String s)
protected java.lang.String getCookie(java.lang.String name)
public HttpSession getSession(boolean create)
protected java.net.URI getSocketURI()
public java.security.Principal getUserPrincipal()
public boolean isRequestedSessionIdFromCookie()
public boolean isRequestedSessionIdFromURL()
public boolean isRequestedSessionIdValid()
public boolean isUserInRole(java.lang.String s)
public void login(java.lang.String s, java.lang.String s1) throws ServletException
ServletException
public void logout() throws ServletException
ServletException
public HttpSession getSession()
public java.lang.String changeSessionId()
public AsyncContext getAsyncContext()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface HttpRequest
public java.util.Enumeration<java.lang.String> getAttributeNames()
public java.lang.String getCharacterEncoding()
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface HttpRequest
public void setCharacterEncoding(java.lang.String s) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public AsyncContext startAsync()
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
public void addInternalParameter(java.lang.String key, java.lang.String val)
public java.lang.String getParameter(java.lang.String name)
HttpRequest
getParameter
in interface HttpRequest
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
public java.util.Enumeration<java.lang.String> getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String s)
public java.lang.String getProtocol()
public java.io.BufferedReader getReader() throws java.io.IOException
java.io.IOException
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getParameters()
HttpRequest
getParameters
in interface HttpRequest
public java.lang.String getRemoteAddr()
getRemoteAddr
in interface HttpRequest
public java.lang.String getRemoteHost()
public int getRemotePort()
public RequestDispatcher getRequestDispatcher(java.lang.String s)
public java.lang.String getScheme()
public java.lang.String getServerName()
public int getServerPort()
public ServletContext getServletContext()
public boolean isAsyncStarted()
public boolean isAsyncSupported()
public boolean isSecure()
public void removeAttribute(java.lang.String s)
public void setPath(java.lang.String path)
public java.lang.String requestRawPath()
public void initPathFromContext(java.lang.String context)
public void setEndListener(EndWebBeansListener end)
public void setApplication(WebContext app)
public void setBeginListener(BeginWebBeansListener begin)
public void init()
public void destroy()