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 java.lang.String
getCharacterEncoding()
Returns expected character encoding of this responsejava.lang.String
getContentType()
Returns MIME type of this responsecom.yahoo.container.handler.Coverage
getCoverage()
com.yahoo.container.logging.HitCounts
getHitCounts()
java.lang.Iterable<com.yahoo.processing.execution.Execution.Trace.LogValue>
getLogValues()
java.lang.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(java.io.OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler)
static com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean>
waitableRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, java.io.OutputStream stream)
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean>
waitableRender(java.io.OutputStream stream)
-
-
-
Method Detail
-
waitableRender
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> waitableRender(java.io.OutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
waitableRender
public static com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> waitableRender(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, java.io.OutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
render
public void render(java.io.OutputStream output, com.yahoo.jdisc.handler.ContentChannel networkChannel, com.yahoo.jdisc.handler.CompletionHandler handler) throws java.io.IOException
- Specified by:
render
in classcom.yahoo.container.jdisc.ExtendedResponse
- Throws:
java.io.IOException
-
populateAccessLogEntry
public void populateAccessLogEntry(com.yahoo.container.logging.AccessLogEntry accessLogEntry)
- Overrides:
populateAccessLogEntry
in classcom.yahoo.container.jdisc.HttpResponse
-
getParsedQuery
public java.lang.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 java.lang.String getContentType()
Returns MIME type of this response- Overrides:
getContentType
in classcom.yahoo.container.jdisc.HttpResponse
-
getCharacterEncoding
public java.lang.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 java.lang.Iterable<com.yahoo.processing.execution.Execution.Trace.LogValue> getLogValues()
- Overrides:
getLogValues
in classcom.yahoo.container.jdisc.HttpResponse
-
-