Class ExtendedResponse


public abstract class ExtendedResponse extends AsyncHttpResponse
An HTTP response supporting async rendering and extended information for logging.
Author:
Steinar Knutsen
  • Constructor Details

    • ExtendedResponse

      public ExtendedResponse(int status)
  • Method Details

    • render

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

      public String getUser()
      Returns:
      user name performing the request
    • getParsedQuery

      public String getParsedQuery()
      The parsed query or some other normal form for the query/request resulting in this Response. Never null. This default implementation returns null though.
    • getTiming

      public Timing getTiming()
      Returns timing information about the processing leading to this response. This default implementation returns null.
      Returns:
      a Timing instance or null
      See Also:
    • getCoverage

      public Coverage getCoverage()
      Returns the completeness of the scan of the total known data for this response. This default implementation returns null.
      Returns:
      coverage information or null
      See Also:
    • getHitCounts

      public HitCounts getHitCounts()
      Returns the number of "hits" in this. This default implementation returns null.
      Returns:
      a Counts instance or null