Interface BareRequest


  • public interface BareRequest
    Bare (minimal) representation of HTTP Request. Used by WebServer implementations to invoke a Routing.
    • Method Detail

      • webServer

        WebServer webServer()
        Gets actual WebServer instance.
        Returns:
        Actual WebServer instance.
      • socketConfiguration

        SocketConfiguration socketConfiguration()
        Configuration of the socket that received this request.
        Returns:
        socket configuration
      • method

        Http.RequestMethod method()
        Gets an HTTP request method.
        Returns:
        an HTTP method.
      • version

        Http.Version version()
        Gets an HTTP version from the request line such as HTTP/1.1.
        Returns:
        HTTP version.
      • uri

        URI uri()
        Gets a Request-URI (or alternatively path) as defined in request line.
        Returns:
        a request URI
      • localAddress

        String localAddress()
        Gets the Internet Protocol (IP) address of the interface on which the request was received.
        Returns:
        an address.
      • localPort

        int localPort()
        Returns the Internet Protocol (IP) port number of the interface on which the request was received.
        Returns:
        an integer specifying the port number.
      • remoteAddress

        String remoteAddress()
        Gets the Internet Protocol (IP) address of the client or last proxy that sent the request.
        Returns:
        The address of the client that sent the request.
      • remotePort

        int remotePort()
        Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.
        Returns:
        The port number.
      • isSecure

        boolean isSecure()
        Gets an indicating whether this request was made using a secure channel, such as HTTPS.
        Returns:
        true if the request was made using a secure channel.
      • headers

        Map<String,​List<String>> headers()
        Gets http request headers.
        Returns:
        representing http headers.
      • bodyPublisher

        Flow.Publisher<DataChunk> bodyPublisher()
        Gets the Flow Publisher that allows a subscription for request body chunks.
        Returns:
        the publisher
      • requestId

        long requestId()
        A unique correlation ID that is associated with this request and its associated response.
        Returns:
        a unique correlation ID associated with this request and its response
      • closeConnection

        Single<Void> closeConnection()
        Request to close the connection and report success or failure asynchronously with returned single. After connection is closed it is not possible to use it again.
        Returns:
        Single completed when connection is closed.