Class ExtendedResponse


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

      • ExtendedResponse

        public ExtendedResponse​(int status)
    • 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
        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:
        java.io.IOException
      • getUser

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

        public java.lang.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:
        Timing
      • 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:
        Coverage
      • getHitCounts

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