Package com.yahoo.processing.execution
Class ExecutionWithResponse
java.lang.Object
com.yahoo.processing.execution.Execution
com.yahoo.processing.execution.ExecutionWithResponse
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
ConstructorDescriptionExecutionWithResponse
(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
Modifier and TypeMethodDescriptionprotected 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 Details
-
ExecutionWithResponse
public ExecutionWithResponse(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 Details
-
defaultResponse
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
-