Class EventRenderer

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.rendering.EventRenderer
All Implemented Interfaces:
com.yahoo.component.Component, com.yahoo.component.Deconstructable, Cloneable, Comparable<com.yahoo.component.Component>

public class EventRenderer extends com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
A Server-Sent Events (SSE) renderer for asynchronous events such as tokens from a language model.
Author:
lesters
  • Field Summary

    Fields inherited from class com.yahoo.component.AbstractComponent

    isDeconstructable
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    beginList(com.yahoo.processing.response.DataList<?> dataList)
     
    void
     
    void
    data(com.yahoo.processing.response.Data data)
     
    void
    endList(com.yahoo.processing.response.DataList<?> dataList)
     
    void
     
     
     

    Methods inherited from class com.yahoo.processing.rendering.AsynchronousSectionedRenderer

    clientClosed, deconstruct, getExecution, getRecursionLevel, getResponse, init, onClientClosed, renderResponse, renderResponseBeforeHandover, setNetworkWiring

    Methods inherited from class com.yahoo.processing.rendering.Renderer

    clone

    Methods inherited from class com.yahoo.component.AbstractComponent

    compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EventRenderer

      public EventRenderer()
    • EventRenderer

      public EventRenderer(Executor executor)
  • Method Details

    • beginResponse

      public void beginResponse(OutputStream outputStream) throws IOException
      Specified by:
      beginResponse in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      Throws:
      IOException
    • beginList

      public void beginList(com.yahoo.processing.response.DataList<?> dataList) throws IOException
      Specified by:
      beginList in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      Throws:
      IOException
    • data

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

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

      public void endResponse() throws IOException
      Specified by:
      endResponse in class com.yahoo.processing.rendering.AsynchronousSectionedRenderer<Result>
      Throws:
      IOException
    • 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>