Class PageTemplatesXmlRenderer

  • All Implemented Interfaces:
    com.yahoo.component.Component, com.yahoo.component.Deconstructable, Cloneable, Comparable<com.yahoo.component.Component>

    public class PageTemplatesXmlRenderer
    extends com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
    • Constructor Detail

      • PageTemplatesXmlRenderer

        public PageTemplatesXmlRenderer()
      • PageTemplatesXmlRenderer

        public PageTemplatesXmlRenderer​(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 class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      • getEncoding

        public String getEncoding()
        Specified by:
        getEncoding in class com.yahoo.processing.rendering.Renderer<Result>
      • getMimeType

        public String getMimeType()
        Specified by:
        getMimeType in class com.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​(OutputStream stream)
        Specified by:
        beginResponse in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      • getRequestedEncoding

        public final 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 class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      • data

        public void data​(com.yahoo.processing.response.Data data)
        Specified by:
        data in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      • endList

        public void endList​(com.yahoo.processing.response.DataList<?> list)
        Specified by:
        endList in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      • endResponse

        public void endResponse()
        Specified by:
        endResponse in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>