Class DiscFilterRequest

  • Direct Known Subclasses:
    JdiscFilterRequest

    public class DiscFilterRequest
    extends Object
    The Request class on which all filters will operate upon.
    • Constructor Detail

      • DiscFilterRequest

        public DiscFilterRequest​(HttpRequest parent)
    • Method Detail

      • getMethod

        public String getMethod()
      • getUri

        public URI getUri()
      • getRemoteAddr

        public String getRemoteAddr()
        Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
      • setRemoteAddr

        public void setRemoteAddr​(String remoteIpAddress)
        Set the IP address of the remote client associated with this Request.
      • getLocalAddr

        public String getLocalAddr()
        Returns the Internet Protocol (IP) address of the interface on which the request was received.
      • getAttribute

        public Object getAttribute​(String name)
      • setAttribute

        public void setAttribute​(String name,
                                 Object value)
      • containsAttribute

        public boolean containsAttribute​(String name)
      • removeAttribute

        public void removeAttribute​(String name)
      • getParameter

        public String getParameter​(String name)
      • getParameterNamesAsList

        public List<String> getParameterNamesAsList()
      • getParameterValuesAsList

        public List<String> getParameterValuesAsList​(String name)
      • getRemoteHost

        public String 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

        public Map<String,​List<String>> getUntreatedParams()
        Returns a unmodifiable map of untreatedParameters from the parent request.
      • getUntreatedHeaders

        public com.yahoo.jdisc.HeaderFields getUntreatedHeaders()
        Returns the untreatedHeaders from parent request
      • getUntreatedCookies

        public List<Cookie> getUntreatedCookies()
        Returns the untreatedCookies from parent request
      • addHeader

        public void addHeader​(String name,
                              String value)
        Sets a header with the given name and value. If the header had already been set, the new value overwrites the previous one.
      • getDateHeader

        public long getDateHeader​(String name)
      • getHeaderNamesAsList

        public List<String> getHeaderNamesAsList()
      • removeHeaders

        public void removeHeaders​(String name)
      • setHeaders

        public void setHeaders​(String name,
                               String value)
        Sets a header with the given name and value. If the header had already been set, the new value overwrites the previous one.
      • setHeaders

        public void setHeaders​(String name,
                               List<String> values)
        Sets a header with the given name and value. If the header had already been set, the new value overwrites the previous one.
      • getIntHeader

        public int getIntHeader​(String name)
      • setCookies

        public void setCookies​(List<Cookie> cookies)
      • getConnectedAt

        public long getConnectedAt​(TimeUnit unit)
      • getProtocol

        public String getProtocol()
      • getQueryString

        public String getQueryString()
        Returns the query string that is contained in the request URL. Returns the undecoded value uri.getRawQuery()
      • getRemoteUser

        public String 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

        public String getRequestURI()
      • getRequestedSessionId

        public String getRequestedSessionId()
      • getScheme

        public String getScheme()
      • setScheme

        @Deprecated
        public void setScheme​(String scheme,
                              boolean isSecure)
        Deprecated.
      • getServerName

        public String getServerName()
      • getServerPort

        public int getServerPort()
      • getUserPrincipal

        public Principal getUserPrincipal()
      • isSecure

        public boolean isSecure()
      • isUserInRole

        public boolean isUserInRole​(String role)
        Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
      • setOverrideIsUserInRole

        public void setOverrideIsUserInRole​(boolean overrideIsUserInRole)
      • setRemoteHost

        public void setRemoteHost​(String remoteAddr)
      • setRemoteUser

        public void setRemoteUser​(String remoteUser)
      • setUserPrincipal

        public void setUserPrincipal​(Principal principal)
      • getClientCertificateChain

        public List<X509Certificate> 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

        public void setUserRoles​(String[] roles)
      • getContentType

        public String getContentType()
        Returns the content-type for the request
      • getCharacterEncoding

        public String getCharacterEncoding()
        Get character encoding
      • setCharacterEncoding

        public void setCharacterEncoding​(String encoding)
        Set character encoding
      • addCookie

        public void addCookie​(JDiscCookieWrapper cookie)
        Can be called multiple times to add Cookies
      • clearCookies

        public void clearCookies()