public class JsonRenderer extends com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
Constructor and Description |
---|
JsonRenderer() |
JsonRenderer(Executor executor)
Creates a json renderer using a custom executor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginList(com.yahoo.processing.response.DataList<?> list) |
void |
beginResponse(OutputStream stream) |
protected static com.fasterxml.jackson.databind.ObjectMapper |
createJsonCodec()
Create the codec used for rendering instances of
TreeNode . |
void |
data(com.yahoo.processing.response.Data data) |
void |
endList(com.yahoo.processing.response.DataList<?> list) |
void |
endResponse() |
String |
getEncoding() |
String |
getMimeType() |
void |
init() |
protected void |
moreChildren() |
clientClosed, deconstruct, getExecution, getRecursionLevel, getResponse, onClientClosed, render, renderBeforeHandover, setNetworkWiring
public JsonRenderer()
public JsonRenderer(Executor executor)
protected static com.fasterxml.jackson.databind.ObjectMapper createJsonCodec()
TreeNode
. This
method will be invoked when creating the first renderer instance, but not
for each fresh clone used by individual results.public void init()
init
in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
public void beginResponse(OutputStream stream) throws IOException
beginResponse
in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
IOException
public void beginList(com.yahoo.processing.response.DataList<?> list) throws IOException
beginList
in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
IOException
protected void moreChildren() throws IOException
IOException
public void data(com.yahoo.processing.response.Data data) throws IOException
data
in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
IOException
public void endList(com.yahoo.processing.response.DataList<?> list) throws IOException
endList
in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
IOException
public void endResponse() throws IOException
endResponse
in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
IOException
public String getEncoding()
getEncoding
in class com.yahoo.processing.rendering.Renderer<Result>
Copyright © 2018. All rights reserved.