Class ProcessingResponse


  • public class ProcessingResponse
    extends AsyncHttpResponse
    A response from running a request through processing. This response is just a wrapper of the knowhow needed to render the Response from processing.
    Since:
    5.1.12
    Author:
    bratseth, Steinar Knutsen
    • Constructor Detail

      • ProcessingResponse

        public ProcessingResponse​(int status,
                                  com.yahoo.processing.Request processingRequest,
                                  com.yahoo.processing.Response processingResponse,
                                  Renderer renderer,
                                  java.util.concurrent.Executor renderingExecutor,
                                  com.yahoo.processing.execution.Execution execution)
    • Method Detail

      • render

        public void render​(java.io.OutputStream stream,
                           com.yahoo.jdisc.handler.ContentChannel channel,
                           com.yahoo.jdisc.handler.CompletionHandler completionHandler)
                    throws java.io.IOException
        Description copied from class: AsyncHttpResponse
        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.
        Specified by:
        render in class AsyncHttpResponse
        Parameters:
        stream - the stream to which content should be rendered
        channel - the channel which must be closed on completion
        completionHandler - the completion handler to submit when closing the channel, may be null
        Throws:
        java.io.IOException
      • getCharacterEncoding

        public java.lang.String getCharacterEncoding()
        Description copied from class: HttpResponse
        The name of the encoding for the response contents, if applicable. Return null if character set is not applicable to the response in question (e.g. binary formats). If null is returned, not "charset" element is added to the content type header.
        Overrides:
        getCharacterEncoding in class HttpResponse
        Returns:
        by default HttpResponse.DEFAULT_CHARACTER_ENCODING
      • complete

        public void complete()
        Description copied from class: HttpResponse
        Complete creation of this response. This is called by the container once just before writing the response header back to the caller, so this is the last moment at which status and headers can be determined. This default implementation does nothing.
        Overrides:
        complete in class HttpResponse
      • getLogValues

        public java.lang.Iterable<com.yahoo.processing.execution.Execution.Trace.LogValue> getLogValues()
        Overrides:
        getLogValues in class HttpResponse