public class ServletRequestAdapter extends java.lang.Object implements HttpRequest
HttpRequest.Method
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 |
---|
ServletRequestAdapter(HttpServletRequest request) |
ServletRequestAdapter(HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(HttpServletResponse httpServletResponse) |
java.lang.String |
changeSessionId() |
AsyncContext |
getAsyncContext() |
java.lang.Object |
getAttribute(java.lang.String s) |
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() |
Cookie[] |
getCookies() |
long |
getDateHeader(java.lang.String s) |
DispatcherType |
getDispatcherType() |
java.lang.String |
getHeader(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getHeaderNames() |
java.util.Enumeration<java.lang.String> |
getHeaders(java.lang.String s) |
ServletInputStream |
getInputStream() |
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() |
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 |
getParameters()
Gets all the form and URL query parameters
|
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() |
HttpServletRequest |
getRequest() |
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) |
java.net.URI |
getURI()
Gets the URI for the current URL page.
|
java.security.Principal |
getUserPrincipal() |
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 |
removeAttribute(java.lang.String s) |
void |
setAttribute(java.lang.String s,
java.lang.Object o) |
void |
setCharacterEncoding(java.lang.String s) |
AsyncContext |
startAsync() |
AsyncContext |
startAsync(ServletRequest servletRequest,
ServletResponse servletResponse) |
<T extends HttpUpgradeHandler> |
upgrade(java.lang.Class<T> httpUpgradeHandlerClass) |
public ServletRequestAdapter(HttpServletRequest request)
public ServletRequestAdapter(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
public HttpSession getSession(boolean create)
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 java.lang.String getHeader(java.lang.String name)
public 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.net.URI getURI()
HttpRequest
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 boolean authenticate(HttpServletResponse httpServletResponse) throws java.io.IOException, ServletException
java.io.IOException
ServletException
public java.lang.String getAuthType()
public java.lang.String getContextPath()
public Cookie[] getCookies()
public long getDateHeader(java.lang.String s)
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()
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 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 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
public java.util.Map getParameters()
HttpRequest
getParameters
in interface HttpRequest
public AsyncContext getAsyncContext()
public java.lang.Object getAttribute(java.lang.String s)
getAttribute
in interface HttpRequest
public java.util.Enumeration<java.lang.String> getAttributeNames()
public java.lang.String getCharacterEncoding()
public void setAttribute(java.lang.String s, java.lang.Object o)
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 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 HttpServletRequest getRequest()