Interface HttpServerConnection

    • Method Detail

      • receiveRequestHeader

        HttpRequest receiveRequestHeader()
                                  throws HttpException,
                                         java.io.IOException
        Receives the request line and all headers available from this connection. The caller should examine the returned request and decide if to receive a request entity as well.
        Returns:
        a new HttpRequest object whose request line and headers are initialized.
        Throws:
        HttpException - in case of HTTP protocol violation
        java.io.IOException - in case of an I/O error
      • receiveRequestEntity

        void receiveRequestEntity​(HttpEntityEnclosingRequest request)
                           throws HttpException,
                                  java.io.IOException
        Receives the next request entity available from this connection and attaches it to an existing request.
        Parameters:
        request - the request to attach the entity to.
        Throws:
        HttpException - in case of HTTP protocol violation
        java.io.IOException - in case of an I/O error
      • sendResponseHeader

        void sendResponseHeader​(HttpResponse response)
                         throws HttpException,
                                java.io.IOException
        Sends the response line and headers of a response over this connection.
        Parameters:
        response - the response whose headers to send.
        Throws:
        HttpException - in case of HTTP protocol violation
        java.io.IOException - in case of an I/O error
      • sendResponseEntity

        void sendResponseEntity​(HttpResponse response)
                         throws HttpException,
                                java.io.IOException
        Sends the response entity of a response over this connection.
        Parameters:
        response - the response whose entity to send.
        Throws:
        HttpException - in case of HTTP protocol violation
        java.io.IOException - in case of an I/O error
      • flush

        void flush()
            throws java.io.IOException
        Sends all pending buffered data over this connection.
        Throws:
        java.io.IOException - in case of an I/O error