Package com.yahoo.processing.execution
Class ExecutionWithResponse
- java.lang.Object
-
- com.yahoo.processing.execution.Execution
-
- com.yahoo.processing.execution.ExecutionWithResponse
-
public class ExecutionWithResponse extends Execution
An execution which has a response which is returned when this gets to the end of the chain. This is useful to run processing chains where a response exists up front, typically for on completion listeners.- Author:
- bratseth
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.processing.execution.Execution
Execution.Environment<COMPONENT extends Processor>, Execution.Trace
-
-
Constructor Summary
Constructors Constructor Description ExecutionWithResponse(com.yahoo.component.chain.Chain<? extends Processor> chain, Response response, Execution execution)
Creates an execution which will return a given response at the end of the chain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Response
defaultResponse(Request request)
Creates the default response to return from this kind of execution when there are no further processors.-
Methods inherited from class com.yahoo.processing.execution.Execution
chain, createRoot, createRoot, environment, next, nextIndex, nextProcessor, onInvoking, onReturning, previousProcessor, process, toString, trace
-
-
-
-
Constructor Detail
-
ExecutionWithResponse
public ExecutionWithResponse(com.yahoo.component.chain.Chain<? extends Processor> chain, Response response, Execution execution)
Creates an execution which will return a given response at the end of the chain.- Parameters:
chain
- the chain to execute in thisresponse
- the response this will return fromExecution.process(com.yahoo.processing.Request)
then the end of this chain is reachedexecution
- the the parent of this execution
-
-
Method Detail
-
defaultResponse
protected Response defaultResponse(Request request)
Description copied from class:Execution
Creates the default response to return from this kind of execution when there are no further processors. If this is overridden, make sure to propagate any freezeListener from this to the returned response top-level DataList.- Overrides:
defaultResponse
in classExecution
-
-