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 int |
localPort |
protected java.lang.String |
remoteAddr |
protected java.lang.String |
remoteHost |
protected java.lang.String |
scheme |
protected boolean |
secure |
protected int |
serverPort |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
Constructor and Description |
---|
RemoteIpFilter.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.
|
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.
|
int |
getServerPort()
The default behavior of this method is to return getServerPort() on the
wrapped request object.
|
boolean |
isSecure()
The default behavior of this method is to return isSecure() on the
wrapped request object.
|
void |
removeHeader(java.lang.String name) |
void |
setHeader(java.lang.String name,
java.lang.String value) |
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 |
setServerPort(int serverPort) |
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgrade
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemotePort, getRequest, getRequestDispatcher, getServerName, getServletContext, isAsyncStarted, isAsyncSupported, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemotePort, getRequestDispatcher, getServerName, getServletContext, isAsyncStarted, isAsyncSupported, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
protected final java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers
protected int localPort
protected java.lang.String remoteAddr
protected java.lang.String remoteHost
protected java.lang.String scheme
protected boolean secure
protected int serverPort
public RemoteIpFilter.XForwardedRequest(HttpServletRequest request)
public long getDateHeader(java.lang.String name)
javax.servlet.http.HttpServletRequestWrapper
getDateHeader
in interface HttpServletRequest
getDateHeader
in class HttpServletRequestWrapper
name
- 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.HttpServletRequestWrapper
getHeader
in interface HttpServletRequest
getHeader
in class HttpServletRequestWrapper
name
- 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.HttpServletRequestWrapper
getHeaderNames
in interface HttpServletRequest
getHeaderNames
in class HttpServletRequestWrapper
null
public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
javax.servlet.http.HttpServletRequestWrapper
getHeaders
in interface HttpServletRequest
getHeaders
in class HttpServletRequestWrapper
name
- 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.HttpServletRequestWrapper
getIntHeader
in interface HttpServletRequest
getIntHeader
in class HttpServletRequestWrapper
name
- a String
specifying the name of a request headerpublic int getLocalPort()
javax.servlet.ServletRequestWrapper
getLocalPort
in interface ServletRequest
getLocalPort
in class ServletRequestWrapper
public java.lang.String getRemoteAddr()
javax.servlet.ServletRequestWrapper
getRemoteAddr
in interface ServletRequest
getRemoteAddr
in class ServletRequestWrapper
String
containing the IP address of the client
that sent the requestpublic java.lang.String getRemoteHost()
javax.servlet.ServletRequestWrapper
getRemoteHost
in interface ServletRequest
getRemoteHost
in class ServletRequestWrapper
String
containing the fully qualified name of the
clientpublic java.lang.String getScheme()
javax.servlet.ServletRequestWrapper
getScheme
in interface ServletRequest
getScheme
in class ServletRequestWrapper
String
containing the name of the scheme used to
make this requestpublic int getServerPort()
javax.servlet.ServletRequestWrapper
getServerPort
in interface ServletRequest
getServerPort
in class ServletRequestWrapper
public boolean isSecure()
javax.servlet.ServletRequestWrapper
isSecure
in interface ServletRequest
isSecure
in class ServletRequestWrapper
public void removeHeader(java.lang.String name)
public void setHeader(java.lang.String name, java.lang.String value)
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 setServerPort(int serverPort)
public java.lang.StringBuffer getRequestURL()
javax.servlet.http.HttpServletRequestWrapper
getRequestURL
in interface HttpServletRequest
getRequestURL
in class HttpServletRequestWrapper
StringBuffer
object containing the reconstructed
URLCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.