Class HttpServerRequestWrapper

    • Constructor Detail

      • HttpServerRequestWrapper

        public HttpServerRequestWrapper​(HttpServerRequest delegate)
        Construct new instance.
        Parameters:
        delegate - a request to which will be delegated any requests
    • Method Detail

      • getScopeIds

        public Collection<String> getScopeIds​(Scope scope)
        Description copied from interface: HttpServerScopes
        Get the IDs available for the scope specified.
        Specified by:
        getScopeIds in interface HttpServerScopes
        Parameters:
        scope - the scope the IDs are required for.
        Returns:
        The IDs available for the scope specified or null if the scope specified does not support obtaining scopes by ID.
      • getScope

        public HttpScope getScope​(Scope scope,
                                  String id)
        Description copied from interface: HttpServerScopes
        Get the specified HttpScope with the specified ID.
        Specified by:
        getScope in interface HttpServerScopes
        Parameters:
        scope - the type of the scope required.
        id - the id of the scope instance required.
        Returns:
        the scope specified or null if not supported or if the scope with that ID does not exist.
      • getRequestHeaderValues

        public List<String> getRequestHeaderValues​(String headerName)
        Description copied from interface: HttpServerRequest
        Get a list of all of the values set for the specified header within the HTTP request.
        Specified by:
        getRequestHeaderValues in interface HttpServerRequest
        Parameters:
        headerName - the not null name of the header the values are required for.
        Returns:
        a list of the values set for this header, if the header is not set on the request then null should be returned.
      • getFirstRequestHeaderValue

        public String getFirstRequestHeaderValue​(String headerName)
        Description copied from interface: HttpServerRequest
        Get the first value for the header specified in the HTTP request.
        Specified by:
        getFirstRequestHeaderValue in interface HttpServerRequest
        Parameters:
        headerName - the not null name of the header the value is required for.
        Returns:
        the value for the first instance of the header specified, if the header is not present then null should be returned instead.
      • getPeerCertificates

        public Certificate[] getPeerCertificates()
        Description copied from interface: HttpServerRequest
        Get the peer certificates established on the connection.
        Specified by:
        getPeerCertificates in interface HttpServerRequest
        Returns:
        the peer certificates established on the connection or null if none available.
      • authenticationComplete

        public void authenticationComplete​(HttpServerMechanismsResponder responder,
                                           Runnable logoutHandler)
        Description copied from interface: HttpServerRequest

        Notification that authentication is now complete.

        This method behaves exactly like {@link #authenticationComplete(HttpServerMechanismsResponder)}, allowing mechanisms to register a logout handler which should be called when a logout request is received by the underlying container.

        Specified by:
        authenticationComplete in interface HttpServerRequest
        Parameters:
        responder - a HttpServerMechanismsResponder that can send a response.
        logoutHandler - a Runnable that can handle logout
      • getRequestMethod

        public String getRequestMethod()
        Description copied from interface: HttpServerRequest
        Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
        Specified by:
        getRequestMethod in interface HttpServerRequest
        Returns:
        a String specifying the name of the method with which this request was made
      • getRequestURI

        public URI getRequestURI()
        Description copied from interface: HttpServerRequest
        Get the URI representation for the current request.
        Specified by:
        getRequestURI in interface HttpServerRequest
        Returns:
        the URI representation for the current request.
      • getRequestPath

        public String getRequestPath()
        Description copied from interface: HttpServerRequest
        Get the request path. This is the path relative to the context path. E.g.: for a HTTP GET request to http://my.appserver.com/my-application/path/sub-path this method is going to return /path/sub-path.
        Specified by:
        getRequestPath in interface HttpServerRequest
        Returns:
        the request path
      • getParameters

        public Map<String,​List<String>> getParameters()
        Description copied from interface: HttpServerRequest
        Returns the parameters received in the current request. These parameters will be from both the query string and the form data when available. Where a parameter is named both in the query string and in the form data the List will contain the values from the query string followed by the values from the form data.
        Specified by:
        getParameters in interface HttpServerRequest
        Returns:
        the parameters received in the current request.
      • getParameterNames

        public Set<String> getParameterNames()
        Description copied from interface: HttpServerRequest
        Returns the names of all parameters either from the query string or from the form data where available.
        Specified by:
        getParameterNames in interface HttpServerRequest
        Returns:
        the names of all parameters either from the query string or from the form data where available.
      • getParameterValues

        public List<String> getParameterValues​(String name)
        Description copied from interface: HttpServerRequest
        Return the values for the parameter specified, where a parameter is specified both in the query string and in the form data the query string values will be first in the List.
        Specified by:
        getParameterValues in interface HttpServerRequest
        Parameters:
        name - the name of the desires parameter values.
        Returns:
        the values for the parameter specified or null if the parameter was not in the request.
      • getFirstParameterValue

        public String getFirstParameterValue​(String name)
        Description copied from interface: HttpServerRequest
        Get the first value for the parameter specified.
        Specified by:
        getFirstParameterValue in interface HttpServerRequest
        Parameters:
        name - the name of the parameter the first value is required for.
        Returns:
        the first value of the named parameter or null if the parameter is not available.
      • suspendRequest

        public boolean suspendRequest()
        Description copied from interface: HttpServerRequest
        Suspend the current request so that it can be subsequently resumed.
        Specified by:
        suspendRequest in interface HttpServerRequest
        Returns:
        true if suspending requests is supported, false otherwise.
      • resumeRequest

        public boolean resumeRequest()
        Description copied from interface: HttpServerRequest
        Resume any previously suspended request.
        Specified by:
        resumeRequest in interface HttpServerRequest
        Returns:
        true if resuming requests is supported, false otherwise.