Class AsynchronousRenderer<RESPONSE extends com.yahoo.processing.Response>

  • All Implemented Interfaces:
    com.yahoo.component.Component, java.lang.Cloneable, java.lang.Comparable<com.yahoo.component.Component>
    Direct Known Subclasses:
    AsynchronousSectionedRenderer

    public abstract class AsynchronousRenderer<RESPONSE extends com.yahoo.processing.Response>
    extends Renderer<RESPONSE>
    Superclass of all asynchronous renderers. Subclasses this to receive an executor and the network wiring necessary to respectively run callback listeners and close up the channel when the response is complete.
    Author:
    bratseth
    • Field Summary

      • Fields inherited from class com.yahoo.component.AbstractComponent

        isDeconstructable
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void setNetworkWiring​(com.yahoo.jdisc.handler.ContentChannel channel, com.yahoo.jdisc.handler.CompletionHandler completionHandler)
      Exposes JDisc wiring to ensure asynchronous cleanup.
      • Methods inherited from class com.yahoo.component.AbstractComponent

        compareTo, deconstruct, 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 Detail

      • AsynchronousRenderer

        public AsynchronousRenderer()
    • Method Detail

      • setNetworkWiring

        public abstract void setNetworkWiring​(com.yahoo.jdisc.handler.ContentChannel channel,
                                              com.yahoo.jdisc.handler.CompletionHandler completionHandler)
        Exposes JDisc wiring to ensure asynchronous cleanup.
        Parameters:
        channel - the channel to the client receiving the response
        completionHandler - the JDisc completion handler which will be invoked at the end of the rendering
        Throws:
        java.lang.IllegalStateException - if attempted invoked more than once