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 Modifier and Type Method Description 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)
com.google.common.util.concurrent.ListenableFuture<Boolean>
waitableRender(OutputStream stream)
-
-
-
Method Detail
-
waitableRender
public com.google.common.util.concurrent.ListenableFuture<Boolean> waitableRender(OutputStream stream) throws IOException
- Throws:
IOException
-
waitableRender
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
- Throws:
IOException
-
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
-
-