Class PageTemplatesXmlRenderer
- java.lang.Object
-
- com.yahoo.component.AbstractComponent
-
- com.yahoo.processing.rendering.Renderer<RESPONSE>
-
- com.yahoo.processing.rendering.AsynchronousRenderer<RESPONSE>
-
- com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
- com.yahoo.search.pagetemplates.result.PageTemplatesXmlRenderer
-
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,java.lang.Cloneable
,java.lang.Comparable<com.yahoo.component.Component>
public class PageTemplatesXmlRenderer extends com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_ENCODING
static java.lang.String
DEFAULT_MIMETYPE
-
Constructor Summary
Constructors Constructor Description PageTemplatesXmlRenderer()
PageTemplatesXmlRenderer(java.util.concurrent.Executor executor)
Creates a json renderer using a custom executor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginList(com.yahoo.processing.response.DataList<?> list)
void
beginResponse(java.io.OutputStream stream)
void
data(com.yahoo.processing.response.Data data)
void
endList(com.yahoo.processing.response.DataList<?> list)
void
endResponse()
void
error(com.yahoo.text.XMLWriter writer, Result result)
java.lang.String
getEncoding()
java.lang.String
getMimeType()
java.lang.String
getRequestedEncoding(Query query)
Returns the encoding of the query, or the encoding given by the template if none is setvoid
init()
static void
renderMessageDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorMessage error)
static boolean
simpleRenderDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorHit defaultErrorHit)
-
Methods inherited from class com.yahoo.processing.rendering.AsynchronousSectionedRenderer
clientClosed, deconstruct, getExecution, getRecursionLevel, getResponse, onClientClosed, render, renderBeforeHandover, setNetworkWiring
-
-
-
-
Field Detail
-
DEFAULT_MIMETYPE
public static final java.lang.String DEFAULT_MIMETYPE
- See Also:
- Constant Field Values
-
DEFAULT_ENCODING
public static final java.lang.String DEFAULT_ENCODING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PageTemplatesXmlRenderer
public PageTemplatesXmlRenderer()
-
PageTemplatesXmlRenderer
public PageTemplatesXmlRenderer(java.util.concurrent.Executor executor)
Creates a json renderer using a custom executor. Using a custom executor is useful for tests to avoid creating new threads for each renderer registry.
-
-
Method Detail
-
init
public void init()
- Overrides:
init
in classcom.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncoding
in classcom.yahoo.processing.rendering.Renderer<Result>
-
getMimeType
public java.lang.String getMimeType()
- Specified by:
getMimeType
in classcom.yahoo.processing.rendering.Renderer<Result>
-
error
public void error(com.yahoo.text.XMLWriter writer, Result result)
-
simpleRenderDefaultErrorHit
public static boolean simpleRenderDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorHit defaultErrorHit)
-
renderMessageDefaultErrorHit
public static void renderMessageDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorMessage error)
-
beginResponse
public void beginResponse(java.io.OutputStream stream)
- Specified by:
beginResponse
in classcom.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
getRequestedEncoding
public final java.lang.String getRequestedEncoding(Query query)
Returns the encoding of the query, or the encoding given by the template if none is set
-
beginList
public void beginList(com.yahoo.processing.response.DataList<?> list)
- Specified by:
beginList
in classcom.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
data
public void data(com.yahoo.processing.response.Data data)
- Specified by:
data
in classcom.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
endList
public void endList(com.yahoo.processing.response.DataList<?> list)
- Specified by:
endList
in classcom.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
endResponse
public void endResponse()
- Specified by:
endResponse
in classcom.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
-
-