Package org.eclipse.jetty.server
Class ServletRequestHttpWrapper
- java.lang.Object
-
- javax.servlet.ServletRequestWrapper
-
- org.eclipse.jetty.server.ServletRequestHttpWrapper
-
- All Implemented Interfaces:
HttpServletRequest,ServletRequest
public class ServletRequestHttpWrapper extends ServletRequestWrapper implements HttpServletRequest
ServletRequestHttpWrapper Class to tunnel a ServletRequest via an HttpServletRequest
-
-
Field Summary
-
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
-
Constructor Summary
Constructors Constructor Description ServletRequestHttpWrapper(ServletRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticate(HttpServletResponse response)java.lang.StringchangeSessionId()java.lang.StringgetAuthType()java.lang.StringgetContextPath()Cookie[]getCookies()longgetDateHeader(java.lang.String name)java.lang.StringgetHeader(java.lang.String name)java.util.Enumeration<java.lang.String>getHeaderNames()java.util.Enumeration<java.lang.String>getHeaders(java.lang.String name)intgetIntHeader(java.lang.String name)java.lang.StringgetMethod()PartgetPart(java.lang.String name)java.util.Collection<Part>getParts()java.lang.StringgetPathInfo()java.lang.StringgetPathTranslated()java.lang.StringgetQueryString()java.lang.StringgetRemoteUser()java.lang.StringgetRequestedSessionId()java.lang.StringgetRequestURI()java.lang.StringBuffergetRequestURL()java.lang.StringgetServletPath()HttpSessiongetSession()HttpSessiongetSession(boolean create)java.security.PrincipalgetUserPrincipal()booleanisRequestedSessionIdFromCookie()booleanisRequestedSessionIdFromUrl()booleanisRequestedSessionIdFromURL()booleanisRequestedSessionIdValid()booleanisUserInRole(java.lang.String role)voidlogin(java.lang.String username, java.lang.String password)voidlogout()<T extends HttpUpgradeHandler>
Tupgrade(java.lang.Class<T> handlerClass)-
Methods inherited from class javax.servlet.ServletRequestWrapper
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.servlet.ServletRequest
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
-
-
-
-
Constructor Detail
-
ServletRequestHttpWrapper
public ServletRequestHttpWrapper(ServletRequest request)
-
-
Method Detail
-
getAuthType
public java.lang.String getAuthType()
- Specified by:
getAuthTypein interfaceHttpServletRequest
-
getCookies
public Cookie[] getCookies()
- Specified by:
getCookiesin interfaceHttpServletRequest
-
getDateHeader
public long getDateHeader(java.lang.String name)
- Specified by:
getDateHeaderin interfaceHttpServletRequest
-
getHeader
public java.lang.String getHeader(java.lang.String name)
- Specified by:
getHeaderin interfaceHttpServletRequest
-
getHeaders
public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
- Specified by:
getHeadersin interfaceHttpServletRequest
-
getHeaderNames
public java.util.Enumeration<java.lang.String> getHeaderNames()
- Specified by:
getHeaderNamesin interfaceHttpServletRequest
-
getIntHeader
public int getIntHeader(java.lang.String name)
- Specified by:
getIntHeaderin interfaceHttpServletRequest
-
getMethod
public java.lang.String getMethod()
- Specified by:
getMethodin interfaceHttpServletRequest
-
getPathInfo
public java.lang.String getPathInfo()
- Specified by:
getPathInfoin interfaceHttpServletRequest
-
getPathTranslated
public java.lang.String getPathTranslated()
- Specified by:
getPathTranslatedin interfaceHttpServletRequest
-
getContextPath
public java.lang.String getContextPath()
- Specified by:
getContextPathin interfaceHttpServletRequest
-
getQueryString
public java.lang.String getQueryString()
- Specified by:
getQueryStringin interfaceHttpServletRequest
-
getRemoteUser
public java.lang.String getRemoteUser()
- Specified by:
getRemoteUserin interfaceHttpServletRequest
-
isUserInRole
public boolean isUserInRole(java.lang.String role)
- Specified by:
isUserInRolein interfaceHttpServletRequest
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfaceHttpServletRequest
-
getRequestedSessionId
public java.lang.String getRequestedSessionId()
- Specified by:
getRequestedSessionIdin interfaceHttpServletRequest
-
getRequestURI
public java.lang.String getRequestURI()
- Specified by:
getRequestURIin interfaceHttpServletRequest
-
getRequestURL
public java.lang.StringBuffer getRequestURL()
- Specified by:
getRequestURLin interfaceHttpServletRequest
-
getServletPath
public java.lang.String getServletPath()
- Specified by:
getServletPathin interfaceHttpServletRequest
-
getSession
public HttpSession getSession(boolean create)
- Specified by:
getSessionin interfaceHttpServletRequest
-
getSession
public HttpSession getSession()
- Specified by:
getSessionin interfaceHttpServletRequest
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
- Specified by:
isRequestedSessionIdValidin interfaceHttpServletRequest
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
- Specified by:
isRequestedSessionIdFromCookiein interfaceHttpServletRequest
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
- Specified by:
isRequestedSessionIdFromURLin interfaceHttpServletRequest
-
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
- Specified by:
isRequestedSessionIdFromUrlin interfaceHttpServletRequest
-
authenticate
public boolean authenticate(HttpServletResponse response) throws java.io.IOException, ServletException
- Specified by:
authenticatein interfaceHttpServletRequest- Throws:
java.io.IOExceptionServletException- See Also:
HttpServletRequest.authenticate(javax.servlet.http.HttpServletResponse)
-
getPart
public Part getPart(java.lang.String name) throws java.io.IOException, ServletException
- Specified by:
getPartin interfaceHttpServletRequest- Throws:
java.io.IOExceptionServletException- See Also:
HttpServletRequest.getPart(java.lang.String)
-
getParts
public java.util.Collection<Part> getParts() throws java.io.IOException, ServletException
- Specified by:
getPartsin interfaceHttpServletRequest- Throws:
java.io.IOExceptionServletException- See Also:
HttpServletRequest.getParts()
-
login
public void login(java.lang.String username, java.lang.String password) throws ServletException- Specified by:
loginin interfaceHttpServletRequest- Throws:
ServletException- See Also:
HttpServletRequest.login(java.lang.String, java.lang.String)
-
logout
public void logout() throws ServletException- Specified by:
logoutin interfaceHttpServletRequest- Throws:
ServletException- See Also:
HttpServletRequest.logout()
-
changeSessionId
public java.lang.String changeSessionId()
- Specified by:
changeSessionIdin interfaceHttpServletRequest- See Also:
HttpServletRequest.changeSessionId()
-
upgrade
public <T extends HttpUpgradeHandler> T upgrade(java.lang.Class<T> handlerClass) throws java.io.IOException, ServletException
- Specified by:
upgradein interfaceHttpServletRequest- Throws:
java.io.IOExceptionServletException- See Also:
HttpServletRequest.upgrade(java.lang.Class)
-
-