Interface RequestView


  • public interface RequestView
    Read-only view of the request for use by SecurityResponseFilters.
    Author:
    Tony Vaagenes
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getAttribute​(java.lang.String name)
      Returns a named attribute.
      java.util.Optional<java.lang.String> getFirstHeader​(java.lang.String name)
      Convenience method for retrieving the first value of a named header field.
      java.util.List<java.lang.String> getHeaders​(java.lang.String name)
      Returns an immutable view of all values of a named header field.
      java.util.Optional<HttpRequest.Method> getMethod()
      Returns the Http method.
      java.net.URI getUri()  
    • Method Detail

      • getAttribute

        java.lang.Object getAttribute​(java.lang.String name)
        Returns a named attribute.
        Returns:
        the named data associated with the request that are private to this runtime (not exposed to the client)
        See Also:
        javax.servlet.ServletRequest.getAttribute(java.lang.String), Request.context()
      • getHeaders

        java.util.List<java.lang.String> getHeaders​(java.lang.String name)
        Returns an immutable view of all values of a named header field. Returns an empty list if no such header is present.
      • getFirstHeader

        java.util.Optional<java.lang.String> getFirstHeader​(java.lang.String name)
        Convenience method for retrieving the first value of a named header field. Returns empty if the header is not set, or if the value list is empty.
      • getMethod

        java.util.Optional<HttpRequest.Method> getMethod()
        Returns the Http method. Only present if the underlying request has http-like semantics.
      • getUri

        java.net.URI getUri()