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.
Author:
bratseth, Steinar Knutsen
  • Constructor Details

  • Method Details

    • render

      public void render(OutputStream stream, com.yahoo.jdisc.handler.ContentChannel channel, com.yahoo.jdisc.handler.CompletionHandler completionHandler) throws 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:
      IOException
    • getContentType

      public String getContentType()
      Description copied from class: HttpResponse
      The MIME type of the response contents or null. If null is returned, no content type header is added to the HTTP response.
      Overrides:
      getContentType in class HttpResponse
      Returns:
      by default HttpResponse.DEFAULT_MIME_TYPE
    • getCharacterEncoding

      public 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 Iterable<Execution.Trace.LogValue> getLogValues()
      Overrides:
      getLogValues in class HttpResponse