Package com.yahoo.jdisc.http.filter
Class DiscFilterRequest
java.lang.Object
com.yahoo.jdisc.http.filter.DiscFilterRequest
The Request class on which all filters will operate upon.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classThe set of SimpleDateFormat formats to use in getDateHeader(). -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static DiscFilterRequest.ThreadLocalSimpleDateFormat[]protected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCookie(JDiscCookieWrapper cookie) Can be called multiple times to add CookiesvoidSets a header with the given name and value.voidbooleancontainsAttribute(String name) getAttribute(String name) Get character encodinglonggetConnectedAt(TimeUnit unit) Returns the content-type for the requestlonggetDateHeader(String name) getHeaders(String name) getHeadersAsList(String name) intgetIntHeader(String name) Returns the Internet Protocol (IP) address of the interface on which the request was received.intReturns the Internet Protocol (IP) port number of the interface on which the request was received.getParameter(String name) getParameterValues(String name) Returns the query string that is contained in the request URL.Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.Returns the hostName of remoteHost, or null if noneintReturns the port of remote hostReturns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated.intReturns the untreatedCookies from parent requestReturns the untreatedHeaders from parent requestReturns a unmodifiable map of untreatedParameters from the parent request.getUri()static booleanisMultipart(DiscFilterRequest request) booleanisSecure()booleanisUserInRole(String role) Returns a boolean indicating whether the authenticated user is included in the specified logical "role".voidremoveAttribute(String name) voidremoveHeaders(String name) voidsetAttribute(String name, Object value) voidsetCharacterEncoding(String encoding) Set character encodingvoidsetCookies(List<Cookie> cookies) voidsetHeaders(String name, String value) Sets a header with the given name and value.voidsetHeaders(String name, List<String> values) Sets a header with the given name and value.voidsetOverrideIsUserInRole(boolean overrideIsUserInRole) voidsetRemoteAddr(String remoteIpAddress) Set the IP address of the remote client associated with this Request.voidsetRemoteHost(String remoteAddr) voidsetRemoteUser(String remoteUser) voidsetUserPrincipal(Principal principal) voidsetUserRoles(String[] roles)
-
Field Details
-
HTTPS_PREFIX
- See Also:
-
DEFAULT_HTTP_PORT
protected static final int DEFAULT_HTTP_PORT- See Also:
-
DEFAULT_HTTPS_PORT
protected static final int DEFAULT_HTTPS_PORT- See Also:
-
untreatedParams
-
formats
-
-
Constructor Details
-
DiscFilterRequest
-
-
Method Details
-
getMethod
-
getVersion
-
getUri
-
getRemoteAddr
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request. -
setRemoteAddr
Set the IP address of the remote client associated with this Request. -
getLocalAddr
Returns the Internet Protocol (IP) address of the interface on which the request was received. -
getAttributeNames
-
getAttribute
-
setAttribute
-
containsAttribute
-
removeAttribute
-
getParameter
-
getParameterNames
-
getParameterNamesAsList
-
getParameterValues
-
getParameterValuesAsList
-
getParameterMap
-
getRemoteHost
Returns the hostName of remoteHost, or null if none -
getLocalPort
public int getLocalPort()Returns the Internet Protocol (IP) port number of the interface on which the request was received. -
getRemotePort
public int getRemotePort()Returns the port of remote host -
getUntreatedParams
Returns a unmodifiable map of untreatedParameters from the parent request. -
getUntreatedHeaders
Returns the untreatedHeaders from parent request -
getUntreatedCookies
Returns the untreatedCookies from parent request -
addHeader
Sets a header with the given name and value. If the header had already been set, the new value overwrites the previous one. -
getDateHeader
-
getHeader
-
getHeaderNames
-
getHeaderNamesAsList
-
getHeaders
-
getHeadersAsList
-
removeHeaders
-
setHeaders
Sets a header with the given name and value. If the header had already been set, the new value overwrites the previous one. -
setHeaders
Sets a header with the given name and value. If the header had already been set, the new value overwrites the previous one. -
getIntHeader
-
asRequestView
-
getCookies
-
setCookies
-
getConnectedAt
-
getProtocol
-
getQueryString
Returns the query string that is contained in the request URL. Returns the undecoded value uri.getRawQuery() -
getRemoteUser
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. -
getRequestURI
-
getRequestedSessionId
-
getScheme
-
getServerName
-
getServerPort
public int getServerPort() -
getUserPrincipal
-
isSecure
public boolean isSecure() -
isUserInRole
Returns a boolean indicating whether the authenticated user is included in the specified logical "role". -
setOverrideIsUserInRole
public void setOverrideIsUserInRole(boolean overrideIsUserInRole) -
setRemoteHost
-
setRemoteUser
-
setUserPrincipal
-
getClientCertificateChain
- Returns:
- The client certificate chain in ascending order of trust. The first certificate is the one sent from the client. Returns an empty list if the client did not provide a certificate.
-
setUserRoles
-
getContentType
Returns the content-type for the request -
getCharacterEncoding
Get character encoding -
setCharacterEncoding
Set character encoding -
addCookie
Can be called multiple times to add Cookies -
clearCookies
public void clearCookies() -
getWrappedCookies
-
isMultipart
-