Package com.yahoo.container.jdisc
Class ExtendedResponse
java.lang.Object
com.yahoo.container.jdisc.HttpResponse
com.yahoo.container.jdisc.AsyncHttpResponse
com.yahoo.container.jdisc.ExtendedResponse
An HTTP response supporting async rendering and extended information for logging.
- Author:
- Steinar Knutsen
-
Field Summary
Fields inherited from class com.yahoo.container.jdisc.HttpResponse
DEFAULT_CHARACTER_ENCODING, DEFAULT_MIME_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the completeness of the scan of the total known data for this response.Returns the number of "hits" in this.The parsed query or some other normal form for the query/request resulting in this Response.Returns timing information about the processing leading to this response.getUser()
abstract void
render
(OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler) Render to output asynchronously.Methods inherited from class com.yahoo.container.jdisc.AsyncHttpResponse
render
Methods inherited from class com.yahoo.container.jdisc.HttpResponse
complete, getCharacterEncoding, getContentType, getJdiscResponse, getLogValues, getRequestType, getStatus, headers, maxPendingBytes, populateAccessLogEntry, setRequestType, setStatus
-
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 classAsyncHttpResponse
- Parameters:
output
- the stream to which content should be renderednetworkChannel
- the channel which must be closed on completionhandler
- the completion handler to submit when closing the channel, may be null- Throws:
IOException
-
getUser
- Returns:
- user name performing the request
-
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
Returns timing information about the processing leading to this response. This default implementation returns null.- Returns:
- a Timing instance or null
- See Also:
-
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
Returns the number of "hits" in this. This default implementation returns null.- Returns:
- a Counts instance or null
-