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
ConstructorDescriptionHttpSearchResponse
(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.Coverage
com.yahoo.container.logging.HitCounts
Iterable<com.yahoo.processing.execution.Execution.Trace.LogValue>
getQuery()
Returns the query wrapped by thisReturns the result wrapped by thiscom.yahoo.container.handler.Timing
void
populateAccessLogEntry
(com.yahoo.container.logging.AccessLogEntry accessLogEntry) void
render
(OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler) Methods inherited from class com.yahoo.container.jdisc.ExtendedResponse
getUser
Methods inherited from class com.yahoo.container.jdisc.AsyncHttpResponse
render
Methods 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:
render
in classcom.yahoo.container.jdisc.ExtendedResponse
- Throws:
IOException
-
populateAccessLogEntry
public void populateAccessLogEntry(com.yahoo.container.logging.AccessLogEntry accessLogEntry) - Overrides:
populateAccessLogEntry
in classcom.yahoo.container.jdisc.HttpResponse
-
getParsedQuery
- Overrides:
getParsedQuery
in classcom.yahoo.container.jdisc.ExtendedResponse
-
getTiming
public com.yahoo.container.handler.Timing getTiming()- Overrides:
getTiming
in classcom.yahoo.container.jdisc.ExtendedResponse
-
getCoverage
public com.yahoo.container.handler.Coverage getCoverage()- Overrides:
getCoverage
in classcom.yahoo.container.jdisc.ExtendedResponse
-
getHitCounts
public com.yahoo.container.logging.HitCounts getHitCounts()- Overrides:
getHitCounts
in classcom.yahoo.container.jdisc.ExtendedResponse
-
getContentType
Returns MIME type of this response- Overrides:
getContentType
in classcom.yahoo.container.jdisc.HttpResponse
-
getCharacterEncoding
Returns expected character encoding of this response- Overrides:
getCharacterEncoding
in classcom.yahoo.container.jdisc.HttpResponse
-
getQuery
Returns the query wrapped by this -
getResult
Returns the result wrapped by this -
getLogValues
- Overrides:
getLogValues
in classcom.yahoo.container.jdisc.HttpResponse
-