Class AsyncHttpResponse

    • Constructor Detail

      • AsyncHttpResponse

        public AsyncHttpResponse​(int status)
        Create a new HTTP response with support for async output.
        Parameters:
        status - the HTTP status code for jdisc
        See Also:
        Response
    • Method Detail

      • render

        public abstract void render​(java.io.OutputStream output,
                                    com.yahoo.jdisc.handler.ContentChannel networkChannel,
                                    com.yahoo.jdisc.handler.CompletionHandler handler)
                             throws java.io.IOException
        Render to output asynchronously. The output stream will not be closed when this return. The implementation is responsible for closing the output (using the provided channel and completion handler) when (async) rendering is completed.
        Parameters:
        output - the stream to which content should be rendered
        networkChannel - the channel which must be closed on completion
        handler - the completion handler to submit when closing the channel, may be null
        Throws:
        java.io.IOException