Package com.yahoo.processing.handler
Class AbstractProcessingHandler<COMPONENT extends Processor>
- java.lang.Object
-
- com.yahoo.jdisc.AbstractResource
-
- com.yahoo.jdisc.handler.AbstractRequestHandler
-
- com.yahoo.container.jdisc.ThreadedRequestHandler
-
- com.yahoo.container.jdisc.ThreadedHttpRequestHandler
-
- com.yahoo.container.jdisc.LoggingRequestHandler
-
- com.yahoo.processing.handler.AbstractProcessingHandler<COMPONENT>
-
- 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.container.jdisc.LoggingRequestHandler
LoggingRequestHandler.Context
-
Nested classes/interfaces inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
ThreadedHttpRequestHandler.LazyContentChannel
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_RENDERER_ID
-
Fields inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
CONTENT_TYPE, log
-
Fields inherited from class com.yahoo.container.jdisc.ThreadedRequestHandler
metric
-
-
Constructor Summary
Constructors Constructor Description AbstractProcessingHandler(com.yahoo.container.core.ChainsConfig processingChainsConfig, com.yahoo.component.provider.ComponentRegistry<COMPONENT> chainedComponents, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored)
AbstractProcessingHandler(com.yahoo.container.core.ChainsConfig processingChainsConfig, com.yahoo.component.provider.ComponentRegistry<COMPONENT> chainedComponents, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored, com.yahoo.jdisc.Metric metric)
AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored)
AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored, com.yahoo.jdisc.Metric metric)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Execution
createExecution(Chain<COMPONENT> chain, Request processingRequest)
ChainRegistry<COMPONENT>
getChainRegistry()
Renderer<Response>
getRendererCopy(com.yahoo.component.ComponentSpecification spec)
For internal use onlycom.yahoo.component.provider.ComponentRegistry<Renderer>
getRenderers()
HttpResponse
handle(HttpRequest request)
Throws UnsupportedOperationException: Call handle(request, channel instead)HttpResponse
handle(HttpRequest request, com.yahoo.jdisc.handler.ContentChannel channel)
Override this rather than handle(request) to be able to write to the channel before returning from this method.-
Methods inherited from class com.yahoo.container.jdisc.LoggingRequestHandler
createLoggingCompletionHandler, testOnlyContext
-
Methods inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
addDateHeader, asHttpRequest, handleRequest
-
Methods inherited from class com.yahoo.container.jdisc.ThreadedRequestHandler
executor, getRequestType, getTimeout, handleRequest, writeErrorResponseOnOverload
-
Methods inherited from class com.yahoo.jdisc.AbstractResource
currentState, destroy, refer, release, retainCount
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.yahoo.container.jdisc.HttpRequestHandler
requestHandlerSpec
-
-
-
-
Field Detail
-
DEFAULT_RENDERER_ID
public static final java.lang.String DEFAULT_RENDERER_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractProcessingHandler
public AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored, com.yahoo.jdisc.Metric metric)
-
AbstractProcessingHandler
public AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored)
-
AbstractProcessingHandler
public AbstractProcessingHandler(com.yahoo.container.core.ChainsConfig processingChainsConfig, com.yahoo.component.provider.ComponentRegistry<COMPONENT> chainedComponents, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored)
-
AbstractProcessingHandler
@Inject public AbstractProcessingHandler(com.yahoo.container.core.ChainsConfig processingChainsConfig, com.yahoo.component.provider.ComponentRegistry<COMPONENT> chainedComponents, com.yahoo.component.provider.ComponentRegistry<Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog ignored, com.yahoo.jdisc.Metric metric)
-
-
Method Detail
-
handle
public HttpResponse handle(HttpRequest request)
Throws UnsupportedOperationException: Call handle(request, channel instead)- Specified by:
handle
in classThreadedHttpRequestHandler
- 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 classThreadedHttpRequestHandler
-
createExecution
public Execution createExecution(Chain<COMPONENT> chain, Request processingRequest)
-
getChainRegistry
public ChainRegistry<COMPONENT> getChainRegistry()
-
getRenderers
public com.yahoo.component.provider.ComponentRegistry<Renderer> getRenderers()
-
-