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
@Beta public abstract class ProcessingBase<REQUEST extends com.yahoo.processing.Request,RESPONSE extends com.yahoo.processing.Response,PROCESSOR extends com.yahoo.processing.Processor> extends java.lang.Object
- Author:
- gjoranv
-
-
Constructor Summary
Constructors Constructor Description ProcessingBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract com.yahoo.processing.rendering.Renderer<RESPONSE>
doGetRenderer(com.yahoo.component.ComponentSpecification spec)
protected abstract RESPONSE
doProcess(com.yahoo.component.chain.Chain<PROCESSOR> chain, REQUEST request)
protected abstract com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean>
doProcessAndRender(com.yahoo.component.ComponentSpecification chainSpec, REQUEST request, com.yahoo.processing.rendering.Renderer<RESPONSE> renderer, java.io.ByteArrayOutputStream stream)
protected com.yahoo.component.chain.Chain<PROCESSOR>
getChain(com.yahoo.component.ComponentSpecification chainSpec)
abstract com.yahoo.processing.execution.chain.ChainRegistry<PROCESSOR>
getChains()
Returns a registry of configured chainsprotected com.yahoo.processing.rendering.Renderer<RESPONSE>
getRenderer(com.yahoo.component.ComponentSpecification spec)
RESPONSE
process(com.yahoo.component.ComponentSpecification chain, REQUEST request)
Processes the given request with the given chain, and returns the response.byte[]
processAndRender(com.yahoo.component.ComponentSpecification chainSpec, com.yahoo.component.ComponentSpecification rendererSpec, REQUEST request)
-
-
-
Method Detail
-
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 executerequest
- 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 java.io.IOException
- Throws:
java.io.IOException
-
doProcessAndRender
protected abstract com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> doProcessAndRender(com.yahoo.component.ComponentSpecification chainSpec, REQUEST request, com.yahoo.processing.rendering.Renderer<RESPONSE> renderer, java.io.ByteArrayOutputStream stream) throws java.io.IOException
- Throws:
java.io.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)
-
-