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
-
-
Constructor Summary
Constructors Constructor Description HttpSearchResponse(int status, Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CompletableFuture<Boolean>
asyncRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, OutputStream stream)
CompletableFuture<Boolean>
asyncRender(OutputStream stream)
String
getCharacterEncoding()
Returns expected character encoding of this responseString
getContentType()
Returns MIME type of this responsecom.yahoo.container.handler.Coverage
getCoverage()
com.yahoo.container.logging.HitCounts
getHitCounts()
Iterable<com.yahoo.processing.execution.Execution.Trace.LogValue>
getLogValues()
String
getParsedQuery()
Query
getQuery()
Returns the query wrapped by thisResult
getResult()
Returns the result wrapped by thiscom.yahoo.container.handler.Timing
getTiming()
void
populateAccessLogEntry(com.yahoo.container.logging.AccessLogEntry accessLogEntry)
void
render(OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler)
static com.google.common.util.concurrent.ListenableFuture<Boolean>
waitableRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, OutputStream stream)
Deprecated, for removal: This API element is subject to removal in a future version.com.google.common.util.concurrent.ListenableFuture<Boolean>
waitableRender(OutputStream stream)
Deprecated, for removal: This API element is subject to removal in a future version.UseasyncRender(OutputStream)
instead
-
-
-
Method Detail
-
waitableRender
@Deprecated(forRemoval=true, since="7") public com.google.common.util.concurrent.ListenableFuture<Boolean> waitableRender(OutputStream stream) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.UseasyncRender(OutputStream)
instead- Throws:
IOException
-
waitableRender
@Deprecated(forRemoval=true, since="7") public static com.google.common.util.concurrent.ListenableFuture<Boolean> waitableRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, OutputStream stream) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
asyncRender
public CompletableFuture<Boolean> asyncRender(OutputStream stream)
-
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
public String 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
public String getContentType()
Returns MIME type of this response- Overrides:
getContentType
in classcom.yahoo.container.jdisc.HttpResponse
-
getCharacterEncoding
public String getCharacterEncoding()
Returns expected character encoding of this response- Overrides:
getCharacterEncoding
in classcom.yahoo.container.jdisc.HttpResponse
-
getQuery
public Query getQuery()
Returns the query wrapped by this
-
getResult
public Result getResult()
Returns the result wrapped by this
-
getLogValues
public Iterable<com.yahoo.processing.execution.Execution.Trace.LogValue> getLogValues()
- Overrides:
getLogValues
in classcom.yahoo.container.jdisc.HttpResponse
-
-