Class AbstractProcessingHandler<COMPONENT extends Processor>

java.lang.Object
com.yahoo.jdisc.AbstractResource
com.yahoo.jdisc.handler.AbstractRequestHandler
All Implemented Interfaces:
HttpRequestHandler, com.yahoo.jdisc.handler.RequestHandler, com.yahoo.jdisc.SharedResource
Direct Known Subclasses:
ProcessingHandler

public abstract class AbstractProcessingHandler<COMPONENT extends Processor> extends LoggingRequestHandler
Superclass of handlers invoking some kind of processing chain.

COMPONENT: The type of the processing components of which this executes a chain

Author:
bratseth, Tony Vaagenes, Steinar Knutsen
  • Field Details

  • Constructor Details

    • AbstractProcessingHandler

      public AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, Executor executor, AccessLog ignored, com.yahoo.jdisc.Metric metric)
    • AbstractProcessingHandler

      public AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, Executor executor, AccessLog ignored)
    • AbstractProcessingHandler

      public AbstractProcessingHandler(ChainsConfig processingChainsConfig, com.yahoo.component.provider.ComponentRegistry<COMPONENT> chainedComponents, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, Executor executor, AccessLog ignored)
    • AbstractProcessingHandler

      @Inject public AbstractProcessingHandler(ChainsConfig processingChainsConfig, com.yahoo.component.provider.ComponentRegistry<COMPONENT> chainedComponents, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, Executor executor, AccessLog ignored, com.yahoo.jdisc.Metric metric)
  • Method Details

    • handle

      public HttpResponse handle(HttpRequest request)
      Throws UnsupportedOperationException: Call handle(request, channel instead)
      Specified by:
      handle in class ThreadedHttpRequestHandler
      Parameters:
      request - incoming HTTP request
      Returns:
      a valid HTTP response for presentation to the user
    • handle

      public HttpResponse handle(HttpRequest request, com.yahoo.jdisc.handler.ContentChannel channel)
      Description copied from class: ThreadedHttpRequestHandler
      Override this rather than handle(request) to be able to write to the channel before returning from this method. This default implementation calls handle(request)
      Overrides:
      handle in class ThreadedHttpRequestHandler
    • createExecution

      public Execution createExecution(Chain<COMPONENT> chain, Request processingRequest)
    • getChainRegistry

      public ChainRegistry<COMPONENT> getChainRegistry()
    • getRenderers

      public com.yahoo.component.provider.ComponentRegistry<Renderer> getRenderers()
    • getRendererCopy

      public Renderer<Response> getRendererCopy(com.yahoo.component.ComponentSpecification spec)
      For internal use only