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
-
public abstract class ExtendedResponse extends AsyncHttpResponse
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
Constructors Constructor Description ExtendedResponse(int status)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Coverage
getCoverage()
Returns the completeness of the scan of the total known data for this response.HitCounts
getHitCounts()
Returns the number of "hits" in this.String
getParsedQuery()
The parsed query or some other normal form for the query/request resulting in this Response.Timing
getTiming()
Returns timing information about the processing leading to this response.String
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
-
-
-
-
Method Detail
-
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
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:
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 HitCounts getHitCounts()
Returns the number of "hits" in this. This default implementation returns null.- Returns:
- a Counts instance or null
-
-