public abstract class Renderer<RESPONSE extends com.yahoo.processing.Response> extends com.yahoo.component.AbstractComponent implements Cloneable
Constructor and Description |
---|
Renderer() |
Modifier and Type | Method and Description |
---|---|
Renderer<RESPONSE> |
clone()
Used to create a separate instance for each result to render.
|
abstract String |
getEncoding()
Name of the output encoding, if applicable.
|
abstract String |
getMimeType()
The MIME type of the rendered content sent to the client.
|
void |
init()
Initializes the mutable state, see the contract in the class
documentation.
|
abstract com.google.common.util.concurrent.ListenableFuture<Boolean> |
render(OutputStream stream,
RESPONSE response,
com.yahoo.processing.execution.Execution execution,
com.yahoo.processing.Request request)
Render a response to a stream.
|
public Renderer<RESPONSE> clone()
clone
in class com.yahoo.component.AbstractComponent
public void init()
public abstract com.google.common.util.concurrent.ListenableFuture<Boolean> render(OutputStream stream, RESPONSE response, com.yahoo.processing.execution.Execution execution, com.yahoo.processing.Request request)
stream
- a stream API bridge to JDiscresponse
- the response to renderexecution
- the execution which created this responserequest
- the request matching the responsepublic abstract String getEncoding()
TODO: ensure null is OK
public abstract String getMimeType()
Copyright © 2017. All rights reserved.