public static class RemoteIpFilter.XForwardedRequest extends HttpServletRequestWrapper
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
headers |
protected java.lang.String |
localName |
protected int |
localPort |
protected java.lang.String |
remoteAddr |
protected java.lang.String |
remoteHost |
protected java.lang.String |
scheme |
protected boolean |
secure |
protected java.lang.String |
serverName |
protected int |
serverPort |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH| Constructor and Description |
|---|
XForwardedRequest(HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
long |
getDateHeader(java.lang.String name)
The default behavior of this method is to return getDateHeader(String name) on the wrapped request object.
|
java.lang.String |
getHeader(java.lang.String name)
The default behavior of this method is to return getHeader(String name) on the wrapped request object.
|
protected java.util.Map.Entry<java.lang.String,java.util.List<java.lang.String>> |
getHeaderEntry(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getHeaderNames()
The default behavior of this method is to return getHeaderNames() on the wrapped request object.
|
java.util.Enumeration<java.lang.String> |
getHeaders(java.lang.String name)
The default behavior of this method is to return getHeaders(String name) on the wrapped request object.
|
int |
getIntHeader(java.lang.String name)
The default behavior of this method is to return getIntHeader(String name) on the wrapped request object.
|
java.lang.String |
getLocalName()
The default behavior of this method is to return getLocalName() on the wrapped request object.
|
int |
getLocalPort()
The default behavior of this method is to return getLocalPort() on the wrapped request object.
|
java.lang.String |
getRemoteAddr()
The default behavior of this method is to return getRemoteAddr() on the wrapped request object.
|
java.lang.String |
getRemoteHost()
The default behavior of this method is to return getRemoteHost() on the wrapped request object.
|
java.lang.StringBuffer |
getRequestURL()
The default behavior of this method is to return getRequestURL() on the wrapped request object.
|
java.lang.String |
getScheme()
The default behavior of this method is to return getScheme() on the wrapped request object.
|
java.lang.String |
getServerName()
The default behavior of this method is to return getServerName() on the wrapped request object.
|
int |
getServerPort()
The default behavior of this method is to return getServerPort() on the wrapped request object.
|
PushBuilder |
newPushBuilder()
Obtain a builder for generating push requests.
|
void |
removeHeader(java.lang.String name) |
void |
setHeader(java.lang.String name,
java.lang.String value) |
void |
setLocalName(java.lang.String localName) |
void |
setLocalPort(int localPort) |
void |
setRemoteAddr(java.lang.String remoteAddr) |
void |
setRemoteHost(java.lang.String remoteHost) |
void |
setScheme(java.lang.String scheme) |
void |
setSecure(boolean secure) |
void |
setServerName(java.lang.String serverName) |
void |
setServerPort(int serverPort) |
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getHttpServletMapping, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, upgradegetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemotePort, getRequest, getRequestDispatcher, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemotePort, getRequestDispatcher, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncprotected final java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers
protected java.lang.String localName
protected int localPort
protected java.lang.String remoteAddr
protected java.lang.String remoteHost
protected java.lang.String scheme
protected boolean secure
protected java.lang.String serverName
protected int serverPort
public XForwardedRequest(HttpServletRequest request)
public long getDateHeader(java.lang.String name)
javax.servlet.http.HttpServletRequestWrappergetDateHeader in interface HttpServletRequestgetDateHeader in class HttpServletRequestWrappername - a String specifying the name of the headerlong value representing the date specified in the header expressed as the number of
milliseconds since January 1, 1970 GMT, or -1 if the named header was not included with the requestpublic java.lang.String getHeader(java.lang.String name)
javax.servlet.http.HttpServletRequestWrappergetHeader in interface HttpServletRequestgetHeader in class HttpServletRequestWrappername - a String specifying the header nameString containing the value of the requested header, or null if the request
does not have a header of that nameprotected java.util.Map.Entry<java.lang.String,java.util.List<java.lang.String>> getHeaderEntry(java.lang.String name)
public java.util.Enumeration<java.lang.String> getHeaderNames()
javax.servlet.http.HttpServletRequestWrappergetHeaderNames in interface HttpServletRequestgetHeaderNames in class HttpServletRequestWrappernullpublic java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
javax.servlet.http.HttpServletRequestWrappergetHeaders in interface HttpServletRequestgetHeaders in class HttpServletRequestWrappername - a String specifying the header nameEnumeration containing the values of the requested header. If the request does not have
any headers of that name return an empty enumeration. If the container does not allow access to
header information, return nullpublic int getIntHeader(java.lang.String name)
javax.servlet.http.HttpServletRequestWrappergetIntHeader in interface HttpServletRequestgetIntHeader in class HttpServletRequestWrappername - a String specifying the name of a request headerpublic java.lang.String getLocalName()
javax.servlet.ServletRequestWrappergetLocalName in interface ServletRequestgetLocalName in class ServletRequestWrapperString containing the host name of the IP on which the request was received.public int getLocalPort()
javax.servlet.ServletRequestWrappergetLocalPort in interface ServletRequestgetLocalPort in class ServletRequestWrapperpublic java.lang.String getRemoteAddr()
javax.servlet.ServletRequestWrappergetRemoteAddr in interface ServletRequestgetRemoteAddr in class ServletRequestWrapperString containing the IP address of the client that sent the requestpublic java.lang.String getRemoteHost()
javax.servlet.ServletRequestWrappergetRemoteHost in interface ServletRequestgetRemoteHost in class ServletRequestWrapperString containing the fully qualified name of the clientpublic java.lang.String getScheme()
javax.servlet.ServletRequestWrappergetScheme in interface ServletRequestgetScheme in class ServletRequestWrapperString containing the name of the scheme used to make this requestpublic java.lang.String getServerName()
javax.servlet.ServletRequestWrappergetServerName in interface ServletRequestgetServerName in class ServletRequestWrapperString containing the name of the serverpublic int getServerPort()
javax.servlet.ServletRequestWrappergetServerPort in interface ServletRequestgetServerPort in class ServletRequestWrapperpublic void removeHeader(java.lang.String name)
public void setHeader(java.lang.String name,
java.lang.String value)
public void setLocalName(java.lang.String localName)
public void setLocalPort(int localPort)
public void setRemoteAddr(java.lang.String remoteAddr)
public void setRemoteHost(java.lang.String remoteHost)
public void setScheme(java.lang.String scheme)
public void setSecure(boolean secure)
public void setServerName(java.lang.String serverName)
public void setServerPort(int serverPort)
public java.lang.StringBuffer getRequestURL()
javax.servlet.http.HttpServletRequestWrappergetRequestURL in interface HttpServletRequestgetRequestURL in class HttpServletRequestWrapperStringBuffer object containing the reconstructed URLpublic PushBuilder newPushBuilder()
javax.servlet.http.HttpServletRequestWrapperPushBuilder documents how this request will be used as the
basis for a push request. Each call to this method will return a new instance, independent of any previous
instance obtained.
The default behavior of this method is to return HttpServletRequest.newPushBuilder() on the wrapped
request object.
newPushBuilder in interface HttpServletRequestnewPushBuilder in class HttpServletRequestWrappernull if push is not
supported. Note that even if a PushBuilder instance is returned, by the time that
PushBuilder.push() is called, it may no longer be valid to push a request and the push
request will be ignored.Copyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.