Class AsyncHttpResponse

java.lang.Object
com.yahoo.container.jdisc.HttpResponse
com.yahoo.container.jdisc.AsyncHttpResponse
Direct Known Subclasses:
ExtendedResponse, ProcessingResponse

public abstract class AsyncHttpResponse extends HttpResponse
HTTP response which supports async response rendering.
Author:
bratseth, Steinar Knutsen
  • Constructor Details

    • 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 Details

    • render

      public abstract void render(OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler) throws 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:
      IOException
    • render

      public final void render(OutputStream output)
      Throws UnsupportedOperationException. Use render(OutputStream, ContentChannel, CompletionHandler) instead.
      Specified by:
      render in class HttpResponse