Class DefaultBHttpServerConnection

    • Constructor Detail

      • DefaultBHttpServerConnection

        public DefaultBHttpServerConnection​(int buffersize,
                                            java.nio.charset.CharsetDecoder chardecoder,
                                            java.nio.charset.CharsetEncoder charencoder,
                                            MessageConstraints constraints)
      • DefaultBHttpServerConnection

        public DefaultBHttpServerConnection​(int buffersize)
    • Method Detail

      • bind

        public void bind​(java.net.Socket socket)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveRequestHeader

        public HttpRequest receiveRequestHeader()
                                         throws HttpException,
                                                java.io.IOException
        Description copied from interface: HttpServerConnection
        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.
        Specified by:
        receiveRequestHeader in interface HttpServerConnection
        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
      • sendResponseHeader

        public void sendResponseHeader​(HttpResponse response)
                                throws HttpException,
                                       java.io.IOException
        Description copied from interface: HttpServerConnection
        Sends the response line and headers of a response over this connection.
        Specified by:
        sendResponseHeader in interface HttpServerConnection
        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
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from interface: HttpServerConnection
        Sends all pending buffered data over this connection.
        Specified by:
        flush in interface HttpServerConnection
        Throws:
        java.io.IOException - in case of an I/O error