Class ProcessingBase<REQUEST extends com.yahoo.processing.Request,RESPONSE extends com.yahoo.processing.Response,PROCESSOR extends com.yahoo.processing.Processor>

java.lang.Object
com.yahoo.application.container.ProcessingBase<REQUEST,RESPONSE,PROCESSOR>
Direct Known Subclasses:
Processing, Search

public abstract class ProcessingBase<REQUEST extends com.yahoo.processing.Request,RESPONSE extends com.yahoo.processing.Response,PROCESSOR extends com.yahoo.processing.Processor> extends Object
Author:
gjoranv
  • Constructor Details

    • ProcessingBase

      public ProcessingBase()
  • Method Details

    • getChains

      public abstract com.yahoo.processing.execution.chain.ChainRegistry<PROCESSOR> getChains()
      Returns a registry of configured chains
    • process

      public final RESPONSE process(com.yahoo.component.ComponentSpecification chain, REQUEST request)
      Processes the given request with the given chain, and returns the response.
      Parameters:
      chain - the specification of the chain to execute
      request - the request to process
      Returns:
      a response
    • doProcess

      protected abstract RESPONSE doProcess(com.yahoo.component.chain.Chain<PROCESSOR> chain, REQUEST request)
    • processAndRender

      public final byte[] processAndRender(com.yahoo.component.ComponentSpecification chainSpec, com.yahoo.component.ComponentSpecification rendererSpec, REQUEST request) throws IOException
      Throws:
      IOException
    • doProcessAndRender

      protected abstract CompletableFuture<Boolean> doProcessAndRender(com.yahoo.component.ComponentSpecification chainSpec, REQUEST request, com.yahoo.processing.rendering.Renderer<RESPONSE> renderer, ByteArrayOutputStream stream) throws IOException
      Throws:
      IOException
    • getChain

      protected com.yahoo.component.chain.Chain<PROCESSOR> getChain(com.yahoo.component.ComponentSpecification chainSpec)
    • getRenderer

      protected final com.yahoo.processing.rendering.Renderer<RESPONSE> getRenderer(com.yahoo.component.ComponentSpecification spec)
    • doGetRenderer

      protected abstract com.yahoo.processing.rendering.Renderer<RESPONSE> doGetRenderer(com.yahoo.component.ComponentSpecification spec)