Class HttpServletRequestAdapter

    • Constructor Detail

      • HttpServletRequestAdapter

        public HttpServletRequestAdapter​(javax.servlet.http.HttpServletRequest request)
        Instantiates a new HttpServletRequestAdapter.
        Parameters:
        request - the HTTP request
    • Method Detail

      • touchHeaders

        public MultiValueMap<java.lang.String,java.lang.String> touchHeaders()
        Description copied from class: AbstractRequest
        Returns a map of the request headers that can be modified. If not yet instantiated then create a new one. Must be touch first, because it is lazy initialization.
        Overrides:
        touchHeaders in class AbstractRequest
        Returns:
        an MultiValueMap object, may not be null
      • touchAttributes

        public java.util.Map<java.lang.String,java.lang.Object> touchAttributes()
        Description copied from class: AbstractRequest
        Must be touch first, because it is lazy initialization.
        Overrides:
        touchAttributes in class AbstractRequest
        Returns:
        the attribute map
      • getEncoding

        public java.lang.String getEncoding()
        Description copied from interface: RequestAdapter
        Returns the name of the character encoding used in the body of this request.
        Specified by:
        getEncoding in interface RequestAdapter
        Overrides:
        getEncoding in class AbstractRequest
        Returns:
        a String containing the name of the character encoding, or null if the request does not specify a character encoding
      • setEncoding

        public void setEncoding​(java.lang.String encoding)
                         throws java.io.UnsupportedEncodingException
        Description copied from interface: RequestAdapter
        Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader(). Otherwise, it has no effect.
        Specified by:
        setEncoding in interface RequestAdapter
        Overrides:
        setEncoding in class AbstractRequest
        Parameters:
        encoding - a String containing the name of the character encoding.
        Throws:
        java.io.UnsupportedEncodingException - if the specified encoding is invalid