Package com.yahoo.application.container
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.yahoo.processing.rendering.Renderer<RESPONSE>
doGetRenderer
(com.yahoo.component.ComponentSpecification spec) protected abstract RESPONSE
protected abstract CompletableFuture<Boolean>
doProcessAndRender
(com.yahoo.component.ComponentSpecification chainSpec, REQUEST request, com.yahoo.processing.rendering.Renderer<RESPONSE> renderer, ByteArrayOutputStream stream) protected com.yahoo.component.chain.Chain<PROCESSOR>
getChain
(com.yahoo.component.ComponentSpecification chainSpec) abstract com.yahoo.processing.execution.chain.ChainRegistry<PROCESSOR>
Returns a registry of configured chainsprotected final com.yahoo.processing.rendering.Renderer<RESPONSE>
getRenderer
(com.yahoo.component.ComponentSpecification spec) final RESPONSE
Processes the given request with the given chain, and returns the response.final byte[]
processAndRender
(com.yahoo.component.ComponentSpecification chainSpec, com.yahoo.component.ComponentSpecification rendererSpec, REQUEST request)
-
Constructor Details
-
ProcessingBase
public ProcessingBase()
-
-
Method Details
-
getChains
Returns a registry of configured chains -
process
Processes the given request with the given chain, and returns the response.- Parameters:
chain
- the specification of the chain to executerequest
- the request to process- Returns:
- a response
-
doProcess
-
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)
-