Class HttpRequestWrapper<B>

    • Constructor Detail

      • HttpRequestWrapper

        public HttpRequestWrapper​(HttpRequest<B> delegate)
        Parameters:
        delegate - The Http Request
    • Method Detail

      • accept

        public java.util.Collection<MediaType> accept()
        Description copied from interface: HttpRequest
        A list of accepted MediaType instances sorted by their quality rating.
        Specified by:
        accept in interface HttpRequest<B>
        Returns:
        A list of zero or many MediaType instances
      • getUserPrincipal

        @NonNull
        public java.util.Optional<java.security.Principal> getUserPrincipal()
        Description copied from interface: HttpRequest
        The user principal stored within the request.
        Specified by:
        getUserPrincipal in interface HttpRequest<B>
        Returns:
        The principal
      • getUserPrincipal

        @NonNull
        public <T extends java.security.Principal> java.util.Optional<T> getUserPrincipal​(java.lang.Class<T> principalType)
        Description copied from interface: HttpRequest
        The user principal stored within the request.
        Specified by:
        getUserPrincipal in interface HttpRequest<B>
        Type Parameters:
        T - The principal type
        Parameters:
        principalType - The principal type
        Returns:
        The principal
      • setAttribute

        public HttpRequest<B> setAttribute​(java.lang.CharSequence name,
                                           java.lang.Object value)
        Specified by:
        setAttribute in interface HttpMessage<B>
        Specified by:
        setAttribute in interface HttpRequest<B>
        Specified by:
        setAttribute in interface io.micronaut.core.attr.MutableAttributeHolder
      • getLocale

        public java.util.Optional<java.util.Locale> getLocale()
        Specified by:
        getLocale in interface HttpMessage<B>
        Specified by:
        getLocale in interface HttpRequest<B>
        Returns:
        The locale of the message
      • getCertificate

        public java.util.Optional<java.security.cert.Certificate> getCertificate()
        Description copied from interface: HttpRequest
        Retrieves the Certificate used for mutual authentication.
        Specified by:
        getCertificate in interface HttpRequest<B>
        Returns:
        A certificate used for authentication, if applicable.
      • getMethodName

        public java.lang.String getMethodName()
        Specified by:
        getMethodName in interface HttpRequest<B>
        Returns:
        The name of the method (same as HttpMethod value for standard http methods).
      • getUri

        public java.net.URI getUri()
        Specified by:
        getUri in interface HttpRequest<B>
        Returns:
        The full request URI
      • getPath

        public java.lang.String getPath()
        Specified by:
        getPath in interface HttpRequest<B>
        Returns:
        Get the raw, percent-encoded path without any parameters
      • getRemoteAddress

        public java.net.InetSocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface HttpRequest<B>
        Returns:
        Obtain the remote address
      • getServerAddress

        public java.net.InetSocketAddress getServerAddress()
        Specified by:
        getServerAddress in interface HttpRequest<B>
        Returns:
        Obtain the server address
      • getServerName

        public java.lang.String getServerName()
        Specified by:
        getServerName in interface HttpRequest<B>
        Returns:
        The server host name
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface HttpRequest<B>
        Returns:
        Is the request an HTTPS request