Package com.yahoo.search.handler
Class HttpSearchResponse
java.lang.Object
com.yahoo.container.jdisc.HttpResponse
com.yahoo.container.jdisc.AsyncHttpResponse
com.yahoo.container.jdisc.ExtendedResponse
com.yahoo.search.handler.HttpSearchResponse
public class HttpSearchResponse
extends com.yahoo.container.jdisc.ExtendedResponse
Wrap the result of a query as an HTTP response.
- Author:
- Steinar Knutsen
-
Field Summary
Fields inherited from class com.yahoo.container.jdisc.HttpResponse
DEFAULT_CHARACTER_ENCODING, DEFAULT_MIME_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionHttpSearchResponse(int status, Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer) -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<Boolean>asyncRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, OutputStream stream) asyncRender(OutputStream stream) Returns expected character encoding of this responseReturns MIME type of this responsecom.yahoo.container.handler.Coveragecom.yahoo.container.logging.HitCountsIterable<com.yahoo.processing.execution.Execution.Trace.LogValue>getQuery()Returns the query wrapped by thisReturns the result wrapped by thiscom.yahoo.container.handler.TimingvoidpopulateAccessLogEntry(com.yahoo.container.logging.AccessLogEntry accessLogEntry) voidrender(OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler) Methods inherited from class com.yahoo.container.jdisc.ExtendedResponse
getUserMethods inherited from class com.yahoo.container.jdisc.AsyncHttpResponse
renderMethods inherited from class com.yahoo.container.jdisc.HttpResponse
complete, getJdiscResponse, getRequestType, getStatus, headers, maxPendingBytes, setRequestType, setStatus
-
Constructor Details
-
HttpSearchResponse
-
-
Method Details
-
asyncRender
-
asyncRender
public static CompletableFuture<Boolean> asyncRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, OutputStream stream) -
render
public void render(OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler) throws IOException - Specified by:
renderin classcom.yahoo.container.jdisc.ExtendedResponse- Throws:
IOException
-
populateAccessLogEntry
public void populateAccessLogEntry(com.yahoo.container.logging.AccessLogEntry accessLogEntry) - Overrides:
populateAccessLogEntryin classcom.yahoo.container.jdisc.HttpResponse
-
getParsedQuery
- Overrides:
getParsedQueryin classcom.yahoo.container.jdisc.ExtendedResponse
-
getTiming
public com.yahoo.container.handler.Timing getTiming()- Overrides:
getTimingin classcom.yahoo.container.jdisc.ExtendedResponse
-
getCoverage
public com.yahoo.container.handler.Coverage getCoverage()- Overrides:
getCoveragein classcom.yahoo.container.jdisc.ExtendedResponse
-
getHitCounts
public com.yahoo.container.logging.HitCounts getHitCounts()- Overrides:
getHitCountsin classcom.yahoo.container.jdisc.ExtendedResponse
-
getContentType
Returns MIME type of this response- Overrides:
getContentTypein classcom.yahoo.container.jdisc.HttpResponse
-
getCharacterEncoding
Returns expected character encoding of this response- Overrides:
getCharacterEncodingin classcom.yahoo.container.jdisc.HttpResponse
-
getQuery
Returns the query wrapped by this -
getResult
Returns the result wrapped by this -
getLogValues
- Overrides:
getLogValuesin classcom.yahoo.container.jdisc.HttpResponse
-